Package org.apache.lucene.search
Class DocAndScoreAccBuffer
java.lang.Object
org.apache.lucene.search.DocAndScoreAccBuffer
Wrapper around parallel arrays storing doc IDs and their corresponding score accumulators.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(DocAndFloatFeatureBuffer buffer) Copy content from the givenDocAndFloatFeatureBuffer, expanding float scores to doubles.voidgrow(int minSize) Grow both arrays to ensure that they can store at least the given number of entries.voidgrowNoCopy(int minSize) Grow both arrays to ensure that they can store at least the given number of entries.
-
Field Details
-
docs
public int[] docsDoc IDs -
scores
public double[] scoresScores -
size
public int sizeNumber of valid entries in the doc ID and score arrays.
-
-
Constructor Details
-
DocAndScoreAccBuffer
public DocAndScoreAccBuffer()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. Existing content may be discarded. -
grow
public void grow(int minSize) Grow both arrays to ensure that they can store at least the given number of entries. Existing content is preserved. -
copyFrom
Copy content from the givenDocAndFloatFeatureBuffer, expanding float scores to doubles.
-