Class DocAndScoreAccBuffer

java.lang.Object
org.apache.lucene.search.DocAndScoreAccBuffer

public final class DocAndScoreAccBuffer extends Object
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 Details

    • docs

      public int[] docs
      Doc IDs
    • scores

      public double[] scores
      Scores
    • size

      public int size
      Number 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

      public void copyFrom(DocAndFloatFeatureBuffer buffer)
      Copy content from the given DocAndFloatFeatureBuffer, expanding float scores to doubles.