TextSearch<T> class

Used for doing simple in-memory text searching based on a given set of TextSearchItems. Lower scores are better, with exact case-insensitive matches scoring 0. Uses JaroWinkler distance.

Constructors

TextSearch(List<TextSearchItem<T>> items)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
items List<TextSearchItem<T>>
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

fastSearch(String term, {double matchThreshold = 1.0}) 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 non-existent method or property is accessed. [...]
inherited
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