Adding sort to SearchRequest.
This commit is contained in:
parent
154d1b904b
commit
176a6e7a0d
|
@ -235,8 +235,8 @@ func (hc *HeapCollector) Less(i, j int) bool {
|
||||||
scori := hc.results[i].match.Score
|
scori := hc.results[i].match.Score
|
||||||
scorj := hc.results[j].match.Score
|
scorj := hc.results[j].match.Score
|
||||||
// make sure the list is ordered if everything else is the same...
|
// make sure the list is ordered if everything else is the same...
|
||||||
if scori==scorj{
|
if scori == scorj {
|
||||||
return hc.results[i].match.ID < hc.results[j].match.ID
|
return hc.results[i].match.ID > hc.results[j].match.ID
|
||||||
}
|
}
|
||||||
return scori < scorj
|
return scori < scorj
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user