mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-05 01:50:42 +00:00
Explicit doc for the meaning of intersection_priority
This commit is contained in:
@@ -97,8 +97,8 @@ impl BlockSegmentPostingsNotLoaded {
|
||||
/// Seek into the block segment postings directly, possibly avoiding loading its first block.
|
||||
pub fn seek_and_load(self, seek_doc: DocId) -> (BlockSegmentPostings, usize) {
|
||||
let BlockSegmentPostingsNotLoaded(mut block_segment_postings) = self;
|
||||
block_segment_postings.load_block();
|
||||
let inner_pos = if seek_doc == 0 {
|
||||
block_segment_postings.load_block();
|
||||
0
|
||||
} else {
|
||||
block_segment_postings.seek(seek_doc)
|
||||
|
||||
@@ -146,6 +146,10 @@ pub trait Weight: Send + Sync + 'static {
|
||||
|
||||
/// Returns a priority number used to sort weights when running an
|
||||
/// intersection.
|
||||
///
|
||||
/// Tweaking this value only impacts performance.
|
||||
/// A higher priority means that the `.scorer()` will be more likely to be evaluated
|
||||
/// after the sibling weights, and be passed a higher `seek_doc` value as a result.
|
||||
fn intersection_priority(&self) -> u32 {
|
||||
20u32
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user