Class DocValuesIteratorCache


  • public class DocValuesIteratorCache
    extends Object
    A helper class for random-order value access over docValues (such as in the case of useDocValuesAsStored). This class optimizes access by reusing DocValues iterators where possible, and by narrowing the scope of DocValues per-field/per-segment (shortcircuiting attempts to `advance()` to docs that are known to have no value for a given field).
    • Constructor Detail

      • DocValuesIteratorCache

        public DocValuesIteratorCache​(SolrIndexSearcher searcher)
        Construct an instance used to optimize random-order DocValues iterator access for the specified searcher.
      • DocValuesIteratorCache

        public DocValuesIteratorCache​(SolrIndexSearcher searcher,
                                      boolean cache)
        Construct an instance used to optimize random-order DocValues iterator access for the specified searcher.
        Parameters:
        searcher - the associated searcher
        cache - if false, caching is disabled (useful mainly for single-field, single-doc access).