We faced with issue in customizing the Client conventions. We add custom type (not EPiServer content item) to EPiServer Find Index.
.IdIs(p => p.Id())
.IncludeField(p => p.Name())
.IncludeField(p => p.SearchTitle())
.IncludeField(p => p.SearchSection())
.IncludeField(p => p.SearchSubsection())
.IncludeField(p => p.SearchMetaData())
.IncludeField(p => p.SearchHitUrl(), BusinessExtension.SetSearchHitUrl);
public static class BusinessExtension
public static void SetSearchHitUrl(BaseTool.Business.Data.Models.Business value, string text)
public static string SearchHitUrl(this BaseTool.Business.Data.Models.Business value)
return "SearchHitUrl " + value.Id();
SearchHitUrl calls during indexation process.
SetSearchHitUrl method is never called during MultiUnifiedSearch or UnifiedSearch.
Is it possible to automatically change property value during GetResult() operation?
Hi,Unified search is a bit of a special case. Normally when querying you index and search for a common type, i.e you index Business and query for Business (or som inherited parent type or interface). In this case your query will know every type that it should apply it's convention rules for. However for unified search you don't query for Business types but insted query for the generic ISearchContent that in the result will be mapped to UnifiedSearchHit. This result mapping don't t look for conventions for the 'original' types but instead follows conventions for unified search. The api don't allow for automatically changing the property value in GetResult for UnifiedSearchHit so you best take at the moment is to iterate the result 'manually'.