Class CompletionsTermsReader
- java.lang.Object
-
- org.apache.lucene.search.suggest.document.CompletionsTermsReader
-
- All Implemented Interfaces:
Accountable
public final class CompletionsTermsReader extends java.lang.Object implements Accountable
Holder for suggester and field-level info for a suggest field
-
-
Field Summary
Fields Modifier and Type Field Description private IndexInput
dictIn
private CompletionPostingsFormat.FSTLoadMode
fstLoadMode
long
maxWeight
Maximum entry weight for the suggesterlong
minWeight
Minimum entry weight for the suggesterprivate long
offset
private NRTSuggester
suggester
byte
type
type of suggester (context-enabled or not)-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description 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 indexdictIn
withoffset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Accountable>
getChildResources()
Returns nested resources of this class.long
ramBytesUsed()
Return the memory usage of this object in bytes.NRTSuggester
suggester()
Returns the suggester for a field, if not loaded already, loads the appropriate suggester from CompletionDictionary
-
-
-
Field Detail
-
minWeight
public final long minWeight
Minimum entry weight for the suggester
-
maxWeight
public final long maxWeight
Maximum entry weight for the suggester
-
type
public final byte type
type of suggester (context-enabled or not)
-
dictIn
private final IndexInput dictIn
-
offset
private final long offset
-
fstLoadMode
private final CompletionPostingsFormat.FSTLoadMode fstLoadMode
-
suggester
private NRTSuggester suggester
-
-
Constructor Detail
-
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 indexdictIn
withoffset
-
-
Method Detail
-
suggester
public NRTSuggester suggester() throws java.io.IOException
Returns the suggester for a field, if not loaded already, loads the appropriate suggester from CompletionDictionary- Throws:
java.io.IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-
getChildResources
public java.util.Collection<Accountable> getChildResources()
Description copied from interface:Accountable
Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).- Specified by:
getChildResources
in interfaceAccountable
- See Also:
Accountables
-
-