November Happy Hour will be moved to Thursday December 5th.

Updating a value for existing property in FIND Index

Vote:
 

Hello,

Background

  • The page has a custom property which acts as a category selectory, The type of that property is String. At the FIND , the property is indexed as "CategorySelector$$string": "581"
  • The built in Episerver Category property is not used , at the FIND it is indexed as "Category": []
  • There is a list page which fetch pages from FIND based on Categories.

Approach

With the IncludeField method, I would like to update the inbuilt property "Category" from the custom property "CategorySelector" at the FIND index ,so that the list pages can fetch the pages from FIND based upon buiild in Category property.

The Index at FIND should not be empty for Category property

Ref:

EPiServer.Find.Framework.SearchClient.Instance.Conventions.ForInstancesOf().IncludeField()

Thanks,

Amol Mahul

#177317
Apr 07, 2017 11:10
Vote:
 

You need to put the CategorySelector value into the Category property using the Saving event.

An easier option could be to add a new CategoryList property where you just convert the CategorySelector-value to a correct list item.

#178357
May 09, 2017 22:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.