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

Fruit is the type for the result of our collection. e.g. usize for the Count collector.

Required methods

The query pushes the scored document to the collector via this method.

Extract the fruit of the collection from the SegmentCollector.

Implementations on Foreign Types

Implementors