public interface QueryCachingPolicy
UsageTrackingQueryCachingPolicy
,
LRUQueryCache
Modifier and Type | Field and Description |
---|---|
static QueryCachingPolicy |
ALWAYS_CACHE
Deprecated.
This policy is inefficient as caching too aggressively
disables the ability to skip non-interesting documents. See
UsageTrackingQueryCachingPolicy . |
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)
Whether the given
Query is worth caching. |
@Deprecated static final QueryCachingPolicy ALWAYS_CACHE
UsageTrackingQueryCachingPolicy
.void onUse(Query query)
boolean shouldCache(Query query) throws IOException
Query
is worth caching.
This method will be called by the QueryCache
to know whether to
cache. It 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 scorer will be
returned.IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.