public class BlendedInfixSuggester extends AnalyzingInfixSuggester
| Modifier and Type | Class and Description |
|---|---|
static class |
BlendedInfixSuggester.BlenderType
The different types of blender.
|
Lookup.LookupPriorityQueue, Lookup.LookupResult| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_NUM_FACTOR
Default factor
|
DEFAULT_MIN_PREFIX_CHARSCHARSEQUENCE_COMPARATOR| Constructor and Description |
|---|
BlendedInfixSuggester(Version matchVersion,
File indexPath,
Analyzer analyzer)
Create a new instance, loading from a previously built
directory, if it exists.
|
BlendedInfixSuggester(Version matchVersion,
File indexPath,
Analyzer indexAnalyzer,
Analyzer queryAnalyzer,
int minPrefixChars,
BlendedInfixSuggester.BlenderType blenderType,
int numFactor)
Create a new instance, loading from a previously built
directory, if it exists.
|
| Modifier and Type | Method and Description |
|---|---|
List<Lookup.LookupResult> |
lookup(CharSequence key,
boolean onlyMorePopular,
int num)
Look up a key and return possible completion for this key.
|
List<Lookup.LookupResult> |
lookup(CharSequence key,
int num,
boolean allTermsRequired,
boolean doHighlight)
Retrieve suggestions, specifying whether all terms
must match (
allTermsRequired) and whether the hits
should be highlighted (doHighlight). |
build, close, getCount, load, sizeInBytes, storepublic BlendedInfixSuggester(Version matchVersion, File indexPath, Analyzer analyzer) throws IOException
IOExceptionpublic BlendedInfixSuggester(Version matchVersion, File indexPath, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, BlendedInfixSuggester.BlenderType blenderType, int numFactor) throws IOException
blenderType - Type of blending strategy, see BlenderType for more precisionsnumFactor - Factor to multiply the number of searched elements before ponderateIOException - If there are problems opening the underlying Lucene index.public List<Lookup.LookupResult> lookup(CharSequence key, boolean onlyMorePopular, int num)
Lookuplookup in class AnalyzingInfixSuggesterkey - lookup key. Depending on the implementation this may be
a prefix, misspelling, or even infix.onlyMorePopular - return only more popular resultsnum - maximum number of results to returnpublic List<Lookup.LookupResult> lookup(CharSequence key, int num, boolean allTermsRequired, boolean doHighlight)
AnalyzingInfixSuggesterallTermsRequired) and whether the hits
should be highlighted (doHighlight).lookup in class AnalyzingInfixSuggesterCopyright © 2010 - 2020 Adobe. All Rights Reserved