V9 Examine Search Indexes - How do you update the field definition type?
I want to update the field definition type of a field in the external index, how should this be done in V9?
Previously in V8, we could use the FieldDefinitionColleciton where fields could be added/updated as per the Umbraco documentation:
// add a custom field type
index.FieldDefinitionCollection.TryAdd(new FieldDefinition("price", FieldDefinitionTypes.Double));
// modify an existing field type (not recommended)
index.FieldDefinitionCollection.AddOrUpdate(new FieldDefinition("parentID", FieldDefinitionTypes.FullText));
The index field definitions are now a read only collection so can no longer be updated this way.
Sorry to jump in on an old post - but I am trying to figure out how I can expand the MembersIndex to include custom fields that I have added to the existing Member type.
V9 Examine Search Indexes - How do you update the field definition type?
I want to update the field definition type of a field in the external index, how should this be done in V9?
Previously in V8, we could use the FieldDefinitionColleciton where fields could be added/updated as per the Umbraco documentation:
The index field definitions are now a read only collection so can no longer be updated this way.
Not sure if this will be helpful for you, but I made a setup for the search in this project:
https://github.com/Adolfi/UmbracoNineDemoSite/blob/master/UmbracoNineDemoSite.Core/Features/Search/Examine/Index/UmbracoContentComposer.cs
Sorry to jump in on an old post - but I am trying to figure out how I can expand the MembersIndex to include custom fields that I have added to the existing Member type.
I got here from https://our.umbraco.com/forum/using-umbraco-and-getting-started/109029-custom-fields-not-in-member-examine-index which is my post asking about how to do this!
Hi Luke
The configuration of Examine indexes in Umbraco 9 / Examine 2 works different and is done with .NET’s Options pattern
The documentation on Our https://our.umbraco.com/documentation/reference/searching/examine/indexing/ hasn't been updated for V9 yet, but Shannon has added some docs about it here: https://shazwazza.github.io/Examine/configuration (V1/V2)
I also had a look in Umbraco core and found
ConfigureIndexOptions
https://github.com/umbraco/Umbraco-CMS/search?q=ConfigureIndexOptionsI just tried this in a project to make
nodeName
field sortable, so I can sort employees alphabetically.and then register the configuration in a composer:
Thanks Bjarne - Saved me some time figuring that out there.
is working on a reply...