Package org.apache.solr.search
Class DocValuesIteratorCache
- java.lang.Object
-
- org.apache.solr.search.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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DocValuesIteratorCache.FieldDocValuesSupplier
Supplies (and coordinates arbitrary-order value retrieval over) docValues iterators for a particular field, encapsulating the logic of iterator creation, reuse/caching, and advancing.
-
Constructor Summary
Constructors Constructor Description DocValuesIteratorCache(SolrIndexSearcher searcher)
Construct an instance used to optimize random-order DocValues iterator access for the specified searcher.DocValuesIteratorCache(SolrIndexSearcher searcher, boolean cache)
Construct an instance used to optimize random-order DocValues iterator access for the specified searcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocValuesIteratorCache.FieldDocValuesSupplier
getSupplier(String fieldName)
-
-
-
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 searchercache
- if false, caching is disabled (useful mainly for single-field, single-doc access).
-
-
Method Detail
-
getSupplier
public DocValuesIteratorCache.FieldDocValuesSupplier getSupplier(String fieldName)
-
-