public interface QueryCachingPolicy
|Modifier and Type||Interface and Description|
A simple policy that only caches on the largest segments of an index.
|Modifier and Type||Field and Description|
A simple policy that caches all the provided filters on all segments.
static final QueryCachingPolicy ALWAYS_CACHE
void onUse(Query query)
boolean shouldCache(Query query, LeafReaderContext context) throws IOException
DocIdSetshould be cached on a given segment. This method will be called on each leaf context to know if the filter should be cached on this particular leaf. The filter cache will first attempt to load a
DocIdSetfrom the cache. If it is not cached yet and this method returns true then a cache entry will be generated. Otherwise an uncached set will be returned.
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.