MultiSearch and GetContentResult breaks on hits = null

Vote:
 

I have an issue with MultiSearch which seems to work / not work completely at random.

The problem is on this line

List<SearchResults<JObject>> list = multiSearch.Client.MultiSearch<JObject>(source.Select<Tuple<SearchContext, ProjectionHelper>, Tuple<SearchRequestBody, System.Action<SearchCommand>>>((Func<Tuple<SearchContext, ProjectionHelper>, Tuple<SearchRequestBody, System.Action<SearchCommand>>>) (x => new Tuple<SearchRequestBody, System.Action<SearchCommand>>(x.Item1.RequestBody, x.Item1.CommandAction))), (System.Action<MultiSearchCommand>) null).ToList<SearchResults<JObject>>();

in the GetContentResult extension method. One of the search results has Hits set as null. Which blows up the SearchResultsBase TotalMatching Constructor.

The thing is this works completely random, with no changed parameters for the search and only on certain product categories (this is a product list page). I've had this issue once before, and the only thing that seemed to make a difference was having episerver support clearing the index for me.

Find Version 13.0.1


StackTrace:

Object reference not set to an instance of an object. at EPiServer.Find.SearchResultsBase`1.<GetEnumerator>d__10.MoveNext()\r\n at System.Linq.SystemCore_EnumerableDebugView`1.get_Items()

#201693
Edited, Feb 27, 2019 14:42
* 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.