text_search library

Enables simple partial text search.

Classes

TextSearch<T>
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.
TextSearchItem<T>
Represents a single item that can be searched for. The terms are all variants that match the item. For e.g. an item PlaceType.coffee_shop could have terms: 'coffee', 'latte', etc.
TextSearchItemTerm
Represents a candidate term for a search result.
TextSearchResult<T>
A search result containing the matching object along with the score.