Package org.apache.lucene.index
Class FreqAndNormBuffer
java.lang.Object
org.apache.lucene.index.FreqAndNormBuffer
Wrapper around parallel arrays storing term frequencies and length normalization factors.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int freq, long norm) Add the given pair of term frequency and norm at the end of this buffer, growing underlying arrays if necessary.voidgrowNoCopy(int minSize) Grow both arrays to ensure that they can store at least the given number of entries.
-
Field Details
-
freqs
public int[] freqsTerm frequencies -
norms
public long[] normsLength normalization factors -
size
public int sizeNumber of valid entries in the doc ID and float-valued feature arrays.
-
-
Constructor Details
-
FreqAndNormBuffer
public FreqAndNormBuffer()Sole constructor.
-
-
Method Details
-
growNoCopy
public void growNoCopy(int minSize) Grow both arrays to ensure that they can store at least the given number of entries. -
add
public void add(int freq, long norm) Add the given pair of term frequency and norm at the end of this buffer, growing underlying arrays if necessary.
-