Class FuzzyLookupFactory
java.lang.Object
org.apache.solr.spelling.suggest.LookupFactory
org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory
Factory for
FuzzySuggester- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMaximum number of edits allowed, used byLevenshteinAutomata.toAutomaton(int)in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).static final StringMinimum length of lookup key before any edits are allowed for the suggestions in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).static final StringLength of common (non-fuzzy) prefix for the suggestions in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).static final StringIf transpositions are allowed, Fuzzy suggestions will be computed based on a primitive edit operation.static final StringIftrue, maxEdits, minFuzzyLength, transpositions and nonFuzzyPrefix will be measured in Unicode code points (actual letters) instead of bytes.Fields inherited from class org.apache.solr.spelling.suggest.LookupFactory
DEFAULT_FILE_BASED_DICT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.suggest.LookupCreate a Lookup using config options inparamsand currentcoreReturns the filename in which the in-memory data structure is stored NOTE: not allLookupimplementations store in-memory data structuresMethods inherited from class org.apache.solr.spelling.suggest.LookupFactory
getTempDir
-
Field Details
-
UNICODE_AWARE
Iftrue, maxEdits, minFuzzyLength, transpositions and nonFuzzyPrefix will be measured in Unicode code points (actual letters) instead of bytes.- See Also:
-
MAX_EDITS
Maximum number of edits allowed, used byLevenshteinAutomata.toAutomaton(int)in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).- See Also:
-
TRANSPOSITIONS
If transpositions are allowed, Fuzzy suggestions will be computed based on a primitive edit operation. If it is false, it will be based on the classic Levenshtein algorithm. Transpositions of bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).- See Also:
-
NON_FUZZY_PREFIX
Length of common (non-fuzzy) prefix for the suggestions in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).- See Also:
-
MIN_FUZZY_LENGTH
Minimum length of lookup key before any edits are allowed for the suggestions in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).- See Also:
-
-
Constructor Details
-
FuzzyLookupFactory
public FuzzyLookupFactory()
-
-
Method Details
-
create
public org.apache.lucene.search.suggest.Lookup create(org.apache.solr.common.util.NamedList<?> params, SolrCore core) Description copied from class:LookupFactoryCreate a Lookup using config options inparamsand currentcore- Specified by:
createin classLookupFactory
-
storeFileName
Description copied from class:LookupFactoryReturns the filename in which the in-memory data structure is stored NOTE: not allLookupimplementations store in-memory data structures- Specified by:
storeFileNamein classLookupFactory
-