Module org.apache.lucene.suggest
Class CompletionsTermsReader
java.lang.Object
org.apache.lucene.search.suggest.document.CompletionsTermsReader
- All Implemented Interfaces:
Accountable
Holder for suggester and field-level info for a suggest field
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IndexInputprivate final CompletionPostingsFormat.FSTLoadModefinal longMaximum entry weight for the suggesterfinal longMinimum entry weight for the suggesterprivate final longprivate NRTSuggesterfinal bytetype of suggester (context-enabled or not)Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionCompletionsTermsReader(IndexInput dictIn, long offset, long minWeight, long maxWeight, byte type, CompletionPostingsFormat.FSTLoadMode fstLoadMode) Creates a CompletionTermsReader to load a field-specific suggester from the indexdictInwithoffset -
Method Summary
Modifier and TypeMethodDescriptionReturns nested resources of this class.longReturn the memory usage of this object in bytes.Returns the suggester for a field, if not loaded already, loads the appropriate suggester from CompletionDictionary
-
Field Details
-
minWeight
public final long minWeightMinimum entry weight for the suggester -
maxWeight
public final long maxWeightMaximum entry weight for the suggester -
type
public final byte typetype of suggester (context-enabled or not) -
dictIn
-
offset
private final long offset -
fstLoadMode
-
suggester
-
-
Constructor Details
-
CompletionsTermsReader
CompletionsTermsReader(IndexInput dictIn, long offset, long minWeight, long maxWeight, byte type, CompletionPostingsFormat.FSTLoadMode fstLoadMode) Creates a CompletionTermsReader to load a field-specific suggester from the indexdictInwithoffset
-
-
Method Details
-
suggester
Returns the suggester for a field, if not loaded already, loads the appropriate suggester from CompletionDictionary- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-
getChildResources
Description copied from interface:AccountableReturns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).- Specified by:
getChildResourcesin interfaceAccountable- See Also:
-