I am working on a Sitecore 6.6 upgrade (yes, I know that that is still pretty much obsolete) and I came across a weird bug that took an age to track down. This is more a reminder for myself than anything else.
The code for Lucene searches frequently used lines of the form:
List<SearchHit> distinctHits = hits.Slice(0).Distinct(new SearchHitEqualityComparer()).ToList();
This always returned zero SearchHits. It seems that this is due to the call to ‘Slice(0)‘ bit. This does raise some questions… Continue reading “Sitecore’s SearchHits.Slice(int) method seems to change in Sitecore 6.6”
