Package org.apache.lucene.index.memory
Class MemoryIndex.Info
- java.lang.Object
-
- org.apache.lucene.index.memory.MemoryIndex.Info
-
- Enclosing class:
- MemoryIndex
private final class MemoryIndex.Info extends java.lang.Object
Index data structure for a field; contains the tokenized term texts and their positions.
-
-
Field Summary
Fields Modifier and Type Field Description private MemoryIndex.BinaryDocValuesProducer
binaryProducer
private MemoryIndex.BytesRefHashDocValuesProducer
bytesRefHashProducer
private FieldInfo
fieldInfo
private int
lastOffset
the last offset encountered in this field for multi field supportprivate int
lastPosition
the last position encountered in this field for multi field supportprivate byte[]
maxPackedValue
private int
maxTermFrequency
private byte[]
minPackedValue
private java.lang.Long
norm
private MemoryIndex.NumericDocValuesProducer
numericProducer
private int
numOverlapTokens
Number of overlapping tokens for this fieldprivate int
numTokens
Number of added tokens for this fieldprivate BytesRef[]
pointValues
private int
pointValuesCount
private boolean
preparedDocValuesAndPointValues
private MemoryIndex.SliceByteStartArray
sliceArray
private int[]
sortedTerms
Terms sorted ascending by term text; computed on demandprivate long
sumTotalTermFreq
private BytesRefHash
terms
Term strings and their positions for this field: Map <String termText, ArrayIntList positions>
-
Constructor Summary
Constructors Modifier Constructor Description private
Info(FieldInfo fieldInfo, ByteBlockPool byteBlockPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
freeze()
(package private) NumericDocValues
getNormDocValues()
(package private) void
prepareDocValuesAndPointValues()
(package private) void
sortTerms()
Sorts hashed terms into ascending order, reusing memory along the way.
-
-
-
Field Detail
-
fieldInfo
private FieldInfo fieldInfo
-
norm
private java.lang.Long norm
-
terms
private BytesRefHash terms
Term strings and their positions for this field: Map <String termText, ArrayIntList positions>
-
sliceArray
private MemoryIndex.SliceByteStartArray sliceArray
-
sortedTerms
private transient int[] sortedTerms
Terms sorted ascending by term text; computed on demand
-
numTokens
private int numTokens
Number of added tokens for this field
-
numOverlapTokens
private int numOverlapTokens
Number of overlapping tokens for this field
-
sumTotalTermFreq
private long sumTotalTermFreq
-
maxTermFrequency
private int maxTermFrequency
-
lastPosition
private int lastPosition
the last position encountered in this field for multi field support
-
lastOffset
private int lastOffset
the last offset encountered in this field for multi field support
-
bytesRefHashProducer
private MemoryIndex.BytesRefHashDocValuesProducer bytesRefHashProducer
-
binaryProducer
private MemoryIndex.BinaryDocValuesProducer binaryProducer
-
numericProducer
private MemoryIndex.NumericDocValuesProducer numericProducer
-
preparedDocValuesAndPointValues
private boolean preparedDocValuesAndPointValues
-
pointValues
private BytesRef[] pointValues
-
minPackedValue
private byte[] minPackedValue
-
maxPackedValue
private byte[] maxPackedValue
-
pointValuesCount
private int pointValuesCount
-
-
Constructor Detail
-
Info
private Info(FieldInfo fieldInfo, ByteBlockPool byteBlockPool)
-
-
Method Detail
-
freeze
void freeze()
-
sortTerms
void sortTerms()
Sorts hashed terms into ascending order, reusing memory along the way. Note that sorting is lazily delayed until required (often it's not required at all). If a sorted view is required then hashing + sort + binary search is still faster and smaller than TreeMap usage (which would be an alternative and somewhat more elegant approach, apart from more sophisticated Tries / prefix trees).
-
prepareDocValuesAndPointValues
void prepareDocValuesAndPointValues()
-
getNormDocValues
NumericDocValues getNormDocValues()
-
-