1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! The normalized [`Term`] token type.
use fmt;
use ;
/// A single normalized search term — the output unit of the analysis
/// pipeline and the key under which the full-text index stores
/// postings.
///
/// A `Term` is always the product of [`Analyzer::analyze`]: normalized
/// (lowercased, accent-stripped), tokenized, stop-word-filtered, and
/// optionally stemmed. The same pipeline runs at index time and query
/// time, so a query `Term` is byte-for-byte comparable with the indexed
/// `Term` it should match.
///
/// Construct one only from already-analyzed text. [`from_normalized`]
/// exists for the pipeline itself and for callers that have run the
/// identical analysis; it does **not** normalize on your behalf.
///
/// [`Analyzer::analyze`]: crate::Analyzer::analyze
/// [`from_normalized`]: Term::from_normalized
;