TextSearch<T> class
Used for doing simple in-memory text searching based on a given set of
TextSearchItem
s. Lower scores are better, with exact case-insensitive
matches scoring 0. Uses JaroWinkler
distance.
Constructors
-
TextSearch(List<
TextSearchItem< items)T> >
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
items
→ List<
TextSearchItem< T> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fastSearch(
String term, {double matchThreshold = 1.5}) → List< T> -
Returns search results ordered by decreasing score.
~3-5x faster than
search
, but does not include the search score. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
search(
String term, {double matchThreshold = 1.5}) → List< TextSearchResult< T> > -
Returns search results along with score ordered by decreasing score.
For libraries with 10k+ items,
fastSearch
will start being noticeably faster. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited