November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
As far as I know you can only hi-jack and use the properties already in place on UnifiedSearchHit. Among those you have some dictionary type properties that you can use to append stuff to as well.
I think the smoothest way is to add extension methods with the same name.
I found a way to access the original pagetype using the OriginalObjectGetter property on UnifiedSearchHit.
public static int? GetIntranetId(this UnifiedSearchHit hit)
{
if(hit.OriginalObjectGetter != null)
{
var original = hit.OriginalObjectGetter.Invoke() as SitePageData;
if (original != null)
return original.SearchIntranetId;
}
return null;
}
I guess this might work.
Hi, is there a way to do this yet?
I've indexed a bunch of external content so that we can use a nice unified search solution and I would like to rebuild the original objects from the search hits to get to the custom properties of the items. The OriginalObjectType is set correctly, but the OriginalObjectGetter is null
Thanks!
Dirk
Hi Dirk,
It was reported as a Bug
https://world.episerver.com/support/Bug-list/bug/FIND-3442
Unfortunately I don't belive it has gotten a fix.
When implementing a global search using Unified search i get a list of UnifiedSearchHit as a searchresult. Most of the properties in UnifiedSearchHit is useful to me but i would like to add a few more.
I know i can customize the data in the UnifiedSearchHit by using a Custom projection or by giving the different types different implementations of ISearchContentproperties
Is it possible to achive this somehow?