mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 09:12:55 +00:00
Implementation of Ord trait changed for Hit
- This will result in lexicographical ordering of facet in BinaryHeep in case of a tie
This commit is contained in:
@@ -37,7 +37,10 @@ impl<'a> PartialOrd<Hit<'a>> for Hit<'a> {
|
||||
|
||||
impl<'a> Ord for Hit<'a> {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
other.count.cmp(&self.count)
|
||||
match other.count.cmp(&self.count) {
|
||||
Ordering::Equal => self.facet.cmp(other.facet),
|
||||
x => x,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user