pub enum NameScorer {
OkapiBM25,
TFIDF,
Jaccard,
QueryRatio,
}Expand description
The type of scorer that the name index should use.
The default is OkapiBM25. If you aren’t sure which scorer to use, then stick with the default.
Variants§
OkapiBM25
OkapiBM25 is a TF-IDF-like ranking function, which takes name length into account.
TFIDF
TFIDF is the traditional TF-IDF ranking function, which does not incorporate document length.
Jaccard
Jaccard is a ranking function determined by computing the similarity of ngrams between the query and a name in the index. The similarity is computed by dividing the number of ngrams in common by the total number of distinct ngrams in both the query and the name combined.
QueryRatio
QueryRatio is a ranking function that represents the ratio of query terms that matched a name. It is computed by dividing the number of ngrams in common by the total number of ngrams in the query only.
Implementations§
Source§impl NameScorer
impl NameScorer
Trait Implementations§
Source§impl Clone for NameScorer
impl Clone for NameScorer
Source§fn clone(&self) -> NameScorer
fn clone(&self) -> NameScorer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more