Package org.apache.lucene.search

# Class DocAndFloatFeatureBuffer

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

public final class DocAndFloatFeatureBuffer extends Object
Wrapper around parallel arrays storing doc IDs and their corresponding features, stored as Java floats. These features may be anything, but are typically a term frequency or a score.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int[]`
  `docs`
  Doc IDs
  `float[]`
  `features`
  Float-valued features
  `int`
  `size`
  Number of valid entries in the doc ID and float-valued feature arrays.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DocAndFloatFeatureBuffer()`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `apply(Bits liveDocs)`
  Remove entries from this buffer if their bit is unset in the given `Bits`.
  `void`
  `growNoCopy(int minSize)`
  Grow both arrays to ensure that they can store at least the given number of entries.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### docs

    public int[] docs
    Doc IDs

  - ### features

    public float[] features
    Float-valued features

  - ### size

    public int size
    Number of valid entries in the doc ID and float-valued feature arrays.

- ## Constructor Details

  - ### DocAndFloatFeatureBuffer

    public DocAndFloatFeatureBuffer()
    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.

  - ### apply

    public void apply(Bits liveDocs)
    Remove entries from this buffer if their bit is unset in the given `Bits`.