Component evidence
Trait and utility for computing and modifying document sort keys at the search segment level. Use when customizing search result ranking and collection algorithms.
// Source: https://github.com/quickwit-oss/tantivy | License: MIT | Copyright 2018 by the project authors, as listed in the AUTHORS file
// Provided via justclaw.it.com; keep this notice with the code.
use std::cmp::Ordering;
use crate::collector::sort_key::{Comparator, NaturalComparator};
use crate::collector::sort_key_top_collector::TopBySortKeySegmentCollector;
use crate::collector::{default_collect_segment_impl, SegmentCollector as _, TopNComputer};
use crate::schema::Schema;
use crate::{DocAddress, DocId, Result, Score, SegmentReader};
/// A `SegmentSortKeyComputer` makes it possible to modify the default score
/// for a given document belonging to a specific segment.
///
/// It is the segment local version of the [`SortKeyComputer`].
pub trait SegmentSortKeyComputer: 'static {
... (truncated -- full source via MCP)