Trait tantivy::collector::SegmentCollector [−][src]
pub trait SegmentCollector: 'static {
type Fruit: Fruit;
fn collect(&mut self, doc: DocId, score: Score);
fn harvest(self) -> Self::Fruit;
}
Expand description
The SegmentCollector
is the trait in charge of defining the
collect operation at the scale of the segment.
.collect(doc, score)
will be called for every documents
matching the query.
Associated Types
Required methods
The query pushes the scored document to the collector via this method.