FreeTextSearch class abstract
The FreeTextSearch class exposes the search method that returns a list of SearchResult instances in descending order of relevance.
The length of the returned collection of SearchResult can be limited by passing a limit parameter to search. The default limit is 20.
After parsing the phrase to terms, the Postings
and Dictionary
for the
query terms are asynchronously retrieved from the index:
- dictionaryLoader retrieves
Dictionary
; and - postingsLoader retrieves
Postings
.
Constructors
- FreeTextSearch({required DictionaryLoader dictionaryLoader, required PostingsLoader postingsLoader, TextAnalyzerConfiguration configuration = English.configuration, TokenFilter tokenFilter = TextAnalyzer.defaultTokenFilter})
-
Hydrate a FreeTextSearch instance:
factory
Properties
- dictionaryLoader → DictionaryLoader
-
Asynchronously retrieves a
Dictionary
for query terms from a data source.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- postingsLoader → PostingsLoader
-
Asynchronously retrieves
Postings
for query terms from a data source.no setter - queryParser → QueryParser
-
The query parser
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
search(
String phrase, [int limit = 20]) → Future< List< SearchResult> > -
Returns a list of SearchResult instances in descending order of
relevance to
phrase
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited