You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Looking for Search Extensions for **Umbraco 9**? Check the [v9/dev](https://github.com/callumbwhyte/umbraco-search-extensions/tree/v9/dev) branch._
8
+
_Looking for Search Extensions for **Umbraco 8**? Check the [v8/dev](https://github.com/callumbwhyte/umbraco-search-extensions/tree/v8/dev) branch._
9
9
10
10
## Getting started
11
11
12
-
This package is supported on Umbraco 8.1+.
12
+
This package is supported on Umbraco 9+.
13
13
14
14
### Installation
15
15
@@ -114,15 +114,27 @@ foreach (var result in query.Execute())
114
114
115
115
Search Extensions introduces several new field types into Examine – `json`, `list`, `UDI` and `picker` – to ensure Umbraco data is correctly indexed and queryable.
116
116
117
-
Defining which fields in the index use which types is done through the `IExamineManager`:
117
+
Examine allows controlling an index's fields, field types, and [more](https://shazwazza.github.io/Examine/configuration#iconfigurenamedoptions), via [.NET's Named Options pattern](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options):
118
118
119
119
```
120
-
if (examineManager.TryGetIndex("ExternalIndex", out IIndex index))
120
+
public class ConfigureIndexOptions : IConfigureNamedOptions<LuceneDirectoryIndexOptions>
Umbraco's "path" field is automatically indexed as a list and so a content item with the path `-1,1050,1100` can be queried like this:
@@ -172,17 +184,26 @@ Each property will be created as a field in the index, including any nested prop
172
184
173
185
It is possible to index a subset of a JSON object's properties by supplying a path in (https://www.newtonsoft.com/json/help/html/QueryJsonSelectTokenJsonPath.htm)[JSON Path format].
174
186
175
-
Register a new `ValueTypeFactory` in `IExamineManager` implementing the `json` type, and define the path as a parameter, before assigning it to a field:
187
+
Register a new `ValueTypeFactory` in the index implementing the `json` type, and define the path as a parameter, before assigning it to a field:
176
188
177
189
```
178
-
if (examineManager.TryGetIndex("ExternalIndex", out IIndex index))
190
+
public class ConfigureIndexOptions : IConfigureNamedOptions<LuceneDirectoryIndexOptions>
179
191
{
180
-
index.FieldValueTypeCollection.ValueTypeFactories.AddOrUpdate("position", new DelegateFieldValueTypeFactory(x =>
192
+
public void Configure(string name, LuceneDirectoryIndexOptions options)
0 commit comments