[−][src]Trait tantivy::collector::SegmentCollector
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
type Fruit: Fruit
Fruit
is the type for the result of our collection.
e.g. usize
for the Count
collector.
Required methods
fn collect(&mut self, doc: DocId, score: Score)
The query pushes the scored document to the collector via this method.
fn harvest(self) -> Self::Fruit
Extract the fruit of the collection from the SegmentCollector
.
Implementations on Foreign Types
impl SegmentCollector for Box<dyn BoxableSegmentCollector>
[src]
type Fruit = Box<dyn Fruit>
fn collect(&mut self, doc: u32, score: Score)
[src]
fn harvest(self) -> Box<dyn Fruit>
[src]
impl<Left, Right> SegmentCollector for (Left, Right) where
Left: SegmentCollector,
Right: SegmentCollector,
[src]
Left: SegmentCollector,
Right: SegmentCollector,
type Fruit = (Left::Fruit, Right::Fruit)
fn collect(&mut self, doc: DocId, score: Score)
[src]
fn harvest(self) -> Self::Fruit
[src]
impl<One, Two, Three> SegmentCollector for (One, Two, Three) where
One: SegmentCollector,
Two: SegmentCollector,
Three: SegmentCollector,
[src]
One: SegmentCollector,
Two: SegmentCollector,
Three: SegmentCollector,
type Fruit = (One::Fruit, Two::Fruit, Three::Fruit)
fn collect(&mut self, doc: DocId, score: Score)
[src]
fn harvest(self) -> Self::Fruit
[src]
impl<One, Two, Three, Four> SegmentCollector for (One, Two, Three, Four) where
One: SegmentCollector,
Two: SegmentCollector,
Three: SegmentCollector,
Four: SegmentCollector,
[src]
One: SegmentCollector,
Two: SegmentCollector,
Three: SegmentCollector,
Four: SegmentCollector,