Class FuzzyLookupFactory
- java.lang.Object
-
- org.apache.solr.spelling.suggest.LookupFactory
-
- org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory
-
public class FuzzyLookupFactory extends LookupFactory
Factory forFuzzySuggester- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAX_EDITSMaximum number of edits allowed, used byLevenshteinAutomata.toAutomaton(int)in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).static StringMIN_FUZZY_LENGTHMinimum 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 StringNON_FUZZY_PREFIXLength of common (non-fuzzy) prefix for the suggestions in bytes or Unicode code points (ifUNICODE_AWAREoption is set to true).static StringTRANSPOSITIONSIf transpositions are allowed, Fuzzy suggestions will be computed based on a primitive edit operation.static StringUNICODE_AWAREIftrue, 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 Constructor Description FuzzyLookupFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.search.suggest.Lookupcreate(NamedList<?> params, SolrCore core)Create a Lookup using config options inparamsand currentcoreStringstoreFileName()Returns the filename in which the in-memory data structure is stored NOTE: not allLookupimplementations store in-memory data structures-
Methods inherited from class org.apache.solr.spelling.suggest.LookupFactory
getTempDir
-
-
-
-
Field Detail
-
UNICODE_AWARE
public static final String UNICODE_AWARE
Iftrue, maxEdits, minFuzzyLength, transpositions and nonFuzzyPrefix will be measured in Unicode code points (actual letters) instead of bytes.- See Also:
- Constant Field Values
-
MAX_EDITS
public static final String 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:
- Constant Field Values
-
TRANSPOSITIONS
public static final String 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:
- Constant Field Values
-
NON_FUZZY_PREFIX
public static final String 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:
- Constant Field Values
-
MIN_FUZZY_LENGTH
public static final String 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:
- Constant Field Values
-
-
Method Detail
-
create
public org.apache.lucene.search.suggest.Lookup create(NamedList<?> params, SolrCore core)
Description copied from class:LookupFactoryCreate a Lookup using config options inparamsand currentcore- Specified by:
createin classLookupFactory
-
storeFileName
public String 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
-
-