Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
One way I have found is to create a method to convert a hit, returned by Find, into a PageData object and calling this when processing the results. This gives access to the page properties and can then be cast as a page of specific type to get page type specific properties.
public static PageData ConvertFindResultToPageData(UnifiedSearchHit hit) { var url = new UrlBuilder(hit.Url.ToString()); var hitReference = UrlResolver.Current.Route(new UrlBuilder(url)); PageData hitPage = DataFactory.Instance.GetPage(new PageReference(hitReference.ContentLink.ID)); return hitPage; }
Hi Epi Devs,
Wondering how you set up the search so that it returns the category of the page that's been index and return in search?
I can see in the indexed JSON that the category is there.