Interface FieldLoadingStrategy
- All Known Implementing Classes:
DoubleFieldLoadingStrategy,FloatFieldLoadingStrategy,IntFieldLoadingStrategy,LongFieldLoadingStrategy,StringFieldLoadingStrategy
public interface FieldLoadingStrategy
Using as composition in implementations of
FieldCacheCollector,
so that we can reuse different loading strategies in different kinds
of Collectors.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncollect(int relativeDocId) The collector wants to pick a specific element from the cache.voidloadNewCacheValues(IndexReader reader) A new IndexReader is opened - implementations usually need this to load the next array of cached data.
-
Method Details
-
loadNewCacheValues
A new IndexReader is opened - implementations usually need this to load the next array of cached data.- Parameters:
reader- theIndexReaderfor which to load the new cache values- Throws:
IOException- in case an error occurs reading the cache values from the index
-
collect
The collector wants to pick a specific element from the cache. Only at this point we convert primitives into an object if needed.- Parameters:
relativeDocId- the doc id relative to the current reader- Returns:
- the cached field value for the document with the relative id
relativeDocId.
-