Skip to main content

locate

Function locate 

pub fn locate(
    query: &str,
    text: &str,
    weight: FieldWeight,
) -> Option<Range<usize>>
Expand description

The byte range in raw text, a field of weight, of the occurrence of query the index matches there under folding: the first one starting a word, or inside a word where a field of weight matches inside words (a name or an identity, the query long enough to be a fragment). A query only beginning a name (MIN_ALIAS_SCALARS) shows in any other field only as a whole word. None where the index finds no match.