Struct tantivy::collector::TopCollector [] [src]

pub struct TopCollector { /* fields omitted */ }

The Top Collector keeps track of the K documents with the best scores.

The implementation is based on a BinaryHeap. The theorical complexity is O(n log K).

Methods

impl TopCollector
[src]

[src]

Creates a top collector, with a number of documents equal to "limit".

Panics

The method panics if limit is 0

Important traits for Vec<u8>
[src]

Returns K best documents sorted in decreasing order.

Calling this method triggers the sort. The result of the sort is not cached.

Important traits for Vec<u8>
[src]

Returns K best ScoredDocument sorted in decreasing order.

Calling this method triggers the sort. The result of the sort is not cached.

[src]

Return true iff at least K documents have gone through the collector.

Trait Implementations

impl Collector for TopCollector
[src]

[src]

set_segment is called before beginning to enumerate on this segment. Read more

[src]

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