AutoCompleteFilters Class
Provides pre-built result matching filters for AutoComplete.
Item Index
Methods
- charMatch static
- charMatchCase static
- charMatchFold static
- phraseMatch static
- phraseMatchCase static
- phraseMatchFold static
- startsWith static
- startsWithCase static
- startsWithFold static
- subWordMatch static
- subWordMatchCase static
- subWordMatchFold static
- wordMatch static
- wordMatchCase static
- wordMatchFold static
Methods
charMatch
-
query
-
results
Returns an array of results that contain all of the characters in the query, in any order (not necessarily consecutive). Case-insensitive.
Returns:
charMatchCase
-
query
-
results
Case-sensitive version of charMatch()
.
Returns:
charMatchFold
-
query
-
results
Accent folding version of charMatch()
.
Returns:
phraseMatch
-
query
-
results
Returns an array of results that contain the complete query as a phrase. Case-insensitive.
Returns:
phraseMatchCase
-
query
-
results
Case-sensitive version of phraseMatch()
.
Returns:
phraseMatchFold
-
query
-
results
Accent folding version of phraseMatch()
.
Returns:
startsWith
-
query
-
results
Returns an array of results that start with the complete query as a phrase. Case-insensitive.
Returns:
startsWithCase
-
query
-
results
Case-sensitive version of startsWith()
.
Returns:
startsWithFold
-
query
-
results
Accent folding version of startsWith()
.
Returns:
subWordMatch
-
query
-
results
Returns an array of results in which all the words of the query match either whole words or parts of words in the result. Non-word characters like whitespace and certain punctuation are ignored. Case-insensitive.
This is basically a combination of wordMatch()
(by ignoring whitespace and
word order) and phraseMatch()
(by allowing partial matching instead of
requiring the entire word to match).
Example use case: Trying to find personal names independently of name order (Western or Eastern order) and supporting immediate feedback by allowing partial occurences. So queries like "J. Doe", "Doe, John", and "J. D." would all match "John Doe".
Returns:
subWordMatchCase
-
query
-
results
Case-sensitive version of subWordMatch()
.
Returns:
subWordMatchFold
-
query
-
results
Accent folding version of subWordMatch()
.
Returns:
wordMatch
-
query
-
results
Returns an array of results that contain all of the words in the query, in any order. Non-word characters like whitespace and certain punctuation are ignored. Case-insensitive.