pub struct MatchOpts<'a> {
pub highlight: Option<&'a [Vec<u8>]>,
pub typo: u32,
pub offset: usize,
pub scope: &'a [Vec<u8>],
pub filters: &'a [ValueFilter<'a>],
pub sort: Option<(&'a [u8], bool)>,
pub distinct: Option<&'a [u8]>,
pub facets: &'a [Vec<u8>],
}Expand description
Everything a text MATCH carries beyond its index, query text and result limit — the embedded twin of the wire’s optional clauses.
Grouping them keeps one entry point instead of one per clause, and
MatchOpts::default is the plain query, so a caller opts into
exactly the clauses it names.
Fields§
§highlight: Option<&'a [Vec<u8>]>HIGHLIGHT: None = not requested, Some(&[]) = every indexed
field, Some(names) = only those.
typo: u32TYPO n: edit budget for each bare term; 0 = exact.
offset: usizeOFFSET n: hits to skip before limit takes effect.
scope: &'a [Vec<u8>]IN <field…>: the declared field names to score within; empty =
the whole document.
filters: &'a [ValueFilter<'a>]FILTER …: non-scoring predicates over stored values, ANDed.
They decide which documents are eligible, not what a term is
worth, so the corpus statistics stay whole-corpus.
sort: Option<(&'a [u8], bool)>SORT <field> ASC|DESC: select by a stored value instead of by
score. Selecting, not re-ordering — a document that wins on the
key is chosen even when its score would never have reached the
page.
distinct: Option<&'a [u8]>DISTINCT <field>: at most one hit per value of a stored field,
applied during selection so the page holds limit distinct
documents rather than limit that then collapse.
facets: &'a [Vec<u8>]FACET <field…>: count each field’s values over the whole match
set. Reported alongside the page rather than shaping it.