Duplicate SearchHit in UnifiedSearch

Vote:
 

I am getting duplicate results when using UnifiedSearch. The query looks like this

var productResult = SearchClient.Instance.UnifiedSearch()
                .Filter(x => x.MatchTypeHierarchy(typeof(IProductVariant)))
                .FilterOnCurrentMarket()
                .FilterByCatalogNodes((request.CatalogNodes))
                .Skip(skip)
                .Take(take)
                .GetResult();

This should result in 1 result but I get 2 items, but only one of the hits returns correct object when running 

 var originalType = searchHit.OriginalObjectGetter.Invoke() as IProductVariant;

Debugging I can see that the two hits have 2 different search hit Ids (EPiServer.Find.UnifiedSearch.UnifiedSearchHit}.Id):

CatalogContent_2e5284c8-902a-4770-a7d1-9eec56cfcd9b_no and 
CatalogContent_a12bdcd8-f61a-43a5-9edc-36b8b604d919_no

The original object GUIDs (EPiServer.Find.UnifiedSearch.UnifiedSearchHit.Document.OriginalObjectType.GUID) are the same: 65285790-5efc-3066-9f17-69e8998c267c}

Any clues to why this happens?

#185186
Edited, Nov 10, 2017 11:23
Vote:
 

Issue resolved: there was an issue with the index, it contained some duplicate entries. Cleared it, re-indexed and then search was working as expected. 

#185188
Nov 10, 2017 12:27
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.