FuzzySearchScorer

Methods
2
Fields
None

Getting one

FuzzySearchScorer.new()

Methods

MethodReturnsDescription
score(string, string)numberThe score of itemName for query: both lower-cased with - read as a space; the best ratio, over each query word and item word, of thei…
new()FuzzySearchScorerA new scorer. It keeps no state.

Returned by

MethodReturnsDescription
FuzzySearchScorerClass.newFuzzySearchScorerA new scorer. It keeps no state.

Method details

score

score: (FuzzySearchScorer, string, string) -> number

The score of itemName for query: both lower-cased with - read as a space; the best ratio, over each query word and item word, of their longest common subsequence to the query word's length; plus log10(10 * jaroWinkler) - 0.5 of the whole strings; less 1. Above 0 is a match. NaN for a query with an empty word (two spaces in a row), and -infinity where nothing matches at all.