Class DocValuesIteratorCache.FieldDocValuesSupplier

java.lang.Object
org.apache.solr.search.DocValuesIteratorCache.FieldDocValuesSupplier
Enclosing class:
DocValuesIteratorCache

public static class DocValuesIteratorCache.FieldDocValuesSupplier extends Object
Supplies (and coordinates arbitrary-order value retrieval over) docValues iterators for a particular field, encapsulating the logic of iterator creation, reuse/caching, and advancing. Returned iterators are already positioned, and should not be advanced (though multi-valued iterators may consume/iterate over values/ords).

Instances of this class are specifically designed to support arbitrary-order value retrieval, (e.g., useDocValuesAsStored, ExportWriter) and should generally not be used for ordered retrieval (although ordered retrieval would work perfectly fine, and would add only minimal overhead).

  • Field Details

    • schemaField

      public final SchemaField schemaField
    • type

      public final org.apache.lucene.index.DocValuesType type
  • Method Details

    • getNumericDocValues

      public org.apache.lucene.index.NumericDocValues getNumericDocValues(int localId, org.apache.lucene.index.LeafReader leafReader, int leafOrd) throws IOException
      Returns docValues for the specified doc id in the specified reader, if the specified doc holds docValues for this DocValuesIteratorCache.FieldDocValuesSupplier instance, otherwise returns null.

      If a non-null value is returned, it will already positioned at the specified docId.

      Parameters:
      localId - leaf-scoped docId
      leafReader - reader containing docId
      leafOrd - top-level ord of the specified reader
      Throws:
      IOException
    • getBinaryDocValues

      public org.apache.lucene.index.BinaryDocValues getBinaryDocValues(int localId, org.apache.lucene.index.LeafReader leafReader, int leafOrd) throws IOException
      Returns docValues for the specified doc id in the specified reader, if the specified doc holds docValues for this DocValuesIteratorCache.FieldDocValuesSupplier instance, otherwise returns null.

      If a non-null value is returned, it will already positioned at the specified docId.

      Parameters:
      localId - leaf-scoped docId
      leafReader - reader containing docId
      leafOrd - top-level ord of the specified reader
      Throws:
      IOException
    • getSortedDocValues

      public org.apache.lucene.index.SortedDocValues getSortedDocValues(int localId, org.apache.lucene.index.LeafReader leafReader, int leafOrd) throws IOException
      Returns docValues for the specified doc id in the specified reader, if the specified doc holds docValues for this DocValuesIteratorCache.FieldDocValuesSupplier instance, otherwise returns null.

      If a non-null value is returned, it will already positioned at the specified docId.

      Parameters:
      localId - leaf-scoped docId
      leafReader - reader containing docId
      leafOrd - top-level ord of the specified reader
      Throws:
      IOException
    • getSortedNumericDocValues

      public org.apache.lucene.index.SortedNumericDocValues getSortedNumericDocValues(int localId, org.apache.lucene.index.LeafReader leafReader, int leafOrd) throws IOException
      Returns docValues for the specified doc id in the specified reader, if the specified doc holds docValues for this DocValuesIteratorCache.FieldDocValuesSupplier instance, otherwise returns null.

      If a non-null value is returned, it will already positioned at the specified docId, and with values (SortedNumericDocValues.nextValue()) not yet consumed.

      Parameters:
      localId - leaf-scoped docId
      leafReader - reader containing docId
      leafOrd - top-level ord of the specified reader
      Throws:
      IOException
    • getSortedSetDocValues

      public org.apache.lucene.index.SortedSetDocValues getSortedSetDocValues(int localId, org.apache.lucene.index.LeafReader leafReader, int leafOrd) throws IOException
      Returns docValues for the specified doc id in the specified reader, if the specified doc holds docValues for this DocValuesIteratorCache.FieldDocValuesSupplier instance, otherwise returns null.

      If a non-null value is returned, it will already positioned at the specified docId, and with ords (SortedSetDocValues.nextOrd()) not yet consumed.

      Parameters:
      localId - leaf-scoped docId
      leafReader - reader containing docId
      leafOrd - top-level ord of the specified reader
      Throws:
      IOException