public interface QueryCachingPolicy
UsageTrackingQueryCachingPolicy
,
LRUQueryCache
Modifier and Type | Interface and Description |
---|---|
static class |
QueryCachingPolicy.CacheOnLargeSegments
A simple policy that only caches on the largest segments of an index.
|
Modifier and Type | Field and Description |
---|---|
static QueryCachingPolicy |
ALWAYS_CACHE
A simple policy that caches all the provided filters on all segments.
|
Modifier and Type | Method and Description |
---|---|
void |
onUse(Query query)
Callback that is called every time that a cached filter is used.
|
boolean |
shouldCache(Query query,
LeafReaderContext context)
Whether the given
DocIdSet should be cached on a given segment. |
static final QueryCachingPolicy ALWAYS_CACHE
void onUse(Query query)
boolean shouldCache(Query query, LeafReaderContext context) throws IOException
DocIdSet
should 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 DocIdSet
from 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.IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.