Class MultiValuedBinaryDocValuesField.IntegratedCount

All Implemented Interfaces:
org.apache.lucene.index.IndexableField
Enclosing class:
MultiValuedBinaryDocValuesField

public static class MultiValuedBinaryDocValuesField.IntegratedCount extends MultiValuedBinaryDocValuesField
  • Constructor Details

    • IntegratedCount

      public IntegratedCount(String name, boolean keepDuplicates)
    • IntegratedCount

      public IntegratedCount(String name, boolean keepDuplicates, boolean sorted)
  • Method Details

    • binaryValue

      public org.apache.lucene.util.BytesRef binaryValue()
      Encodes the collection of binary doc values as a single contiguous binary array, wrapped in BytesRef. This array takes the form of [doc value count][length of value 1][value 1][length of value 2][value 2]...
      Specified by:
      binaryValue in interface org.apache.lucene.index.IndexableField
      Specified by:
      binaryValue in class MultiValuedBinaryDocValuesField
    • encode

      public static org.apache.lucene.util.BytesRef encode(List<org.apache.lucene.util.BytesRef> values)
      Encodes a list of BytesRef values into the integrated-count format: [count][len1][val1][len2][val2]....

      Note, this is basically the static version of binaryValue(). The benefit of having this static code is that we can skip the overhead of creating a whole new Lucene field and adding values to it.