Class FreqAndNormBuffer

java.lang.Object
org.apache.lucene.index.FreqAndNormBuffer

public final class FreqAndNormBuffer extends Object
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
    Modifier and Type
    Field
    Description
    int[]
    Term frequencies
    long[]
    Length normalization factors
    int
    Number of valid entries in the doc ID and float-valued feature arrays.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sole constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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

    • freqs

      public int[] freqs
      Term frequencies
    • norms

      public long[] norms
      Length normalization factors
    • size

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