Module org.apache.lucene.suggest
Class CompletionTerms
- java.lang.Object
-
- org.apache.lucene.index.Terms
-
- org.apache.lucene.index.FilterLeafReader.FilterTerms
-
- org.apache.lucene.search.suggest.document.CompletionTerms
-
public final class CompletionTerms extends FilterLeafReader.FilterTerms
WrappedTerms
used bySuggestField
andContextSuggestField
to access corresponding suggester and their attributes
-
-
Field Summary
Fields Modifier and Type Field Description private CompletionsTermsReader
reader
-
Fields inherited from class org.apache.lucene.index.FilterLeafReader.FilterTerms
in
-
Fields inherited from class org.apache.lucene.index.Terms
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description CompletionTerms(Terms in, CompletionsTermsReader reader)
Creates a completionTerms based onCompletionsTermsReader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getMaxWeight()
Returns the maximum weight of all entries in the weighted FSTlong
getMinWeight()
Returns the minimum weight of all entries in the weighted FSTbyte
getType()
Returns the type of FST, eitherSuggestField.TYPE
orContextSuggestField.TYPE
NRTSuggester
suggester()
Returns aNRTSuggester
for the field ornull
if no FST was indexed for this field-
Methods inherited from class org.apache.lucene.index.FilterLeafReader.FilterTerms
getDocCount, getStats, getSumDocFreq, getSumTotalTermFreq, hasFreqs, hasOffsets, hasPayloads, hasPositions, iterator, size
-
-
-
-
Field Detail
-
reader
private final CompletionsTermsReader reader
-
-
Constructor Detail
-
CompletionTerms
CompletionTerms(Terms in, CompletionsTermsReader reader)
Creates a completionTerms based onCompletionsTermsReader
-
-
Method Detail
-
getType
public byte getType()
Returns the type of FST, eitherSuggestField.TYPE
orContextSuggestField.TYPE
-
getMinWeight
public long getMinWeight()
Returns the minimum weight of all entries in the weighted FST
-
getMaxWeight
public long getMaxWeight()
Returns the maximum weight of all entries in the weighted FST
-
suggester
public NRTSuggester suggester() throws java.io.IOException
Returns aNRTSuggester
for the field ornull
if no FST was indexed for this field- Throws:
java.io.IOException
-
-