caio.co/de/cantine

Rename into{,unsorted}_collection_result

Better than hidden in a comment at least :P
Id
d3bb7b1aef70d7c96e40c2751e5f31418b8c016d
Author
Caio
Commit time
2020-01-24T14:22:26+01:00

Modified tique/src/conditional_collector/custom_score.rs

@@ -113,7 +113,7
}

fn harvest(self) -> Self::Fruit {
- self.collector.into_collection_result()
+ self.collector.into_unsorted_collection_result()
}
}

Modified tique/src/conditional_collector/top_collector.rs

@@ -137,7 +137,7
}
}

- pub fn into_collection_result(self) -> CollectionResult<T> {
+ pub fn into_unsorted_collection_result(self) -> CollectionResult<T> {
let segment_id = self.segment_id;
let items = self
.topk
@@ -146,9 +146,6
.map(|(score, doc)| (score, DocAddress(segment_id, doc)))
.collect();

- // XXX This is unsorted. It's ok because we sort during
- // merge, but using the same time to mean two things is
- // rather confusing
CollectionResult {
total: self.total,
visited: self.visited,
@@ -169,7 +166,7
}

fn harvest(self) -> Self::Fruit {
- TopSegmentCollector::into_collection_result(self)
+ TopSegmentCollector::into_unsorted_collection_result(self)
}
}