0
0

Adding sort to SearchRequest.

This commit is contained in:
Danny Tylman 2016-08-10 11:35:47 +03:00
parent 154d1b904b
commit 176a6e7a0d

View File

@ -235,8 +235,8 @@ func (hc *HeapCollector) Less(i, j int) bool {
scori := hc.results[i].match.Score
scorj := hc.results[j].match.Score
// make sure the list is ordered if everything else is the same...
if scori==scorj{
return hc.results[i].match.ID < hc.results[j].match.ID
if scori == scorj {
return hc.results[i].match.ID > hc.results[j].match.ID
}
return scori < scorj
}