Package org.elasticsearch.indices
Class IndicesQueryCache
- java.lang.Object
-
- org.elasticsearch.indices.IndicesQueryCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,QueryCache
public class IndicesQueryCache extends Object implements QueryCache, Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<Integer>INDICES_CACHE_QUERY_COUNT_SETTINGstatic Setting<ByteSizeValue>INDICES_CACHE_QUERY_SIZE_SETTINGstatic Setting<Boolean>INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING
-
Constructor Summary
Constructors Constructor Description IndicesQueryCache(Settings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearIndex(String index)Clear all entries that belong to the given index.voidclose()WeightdoCache(Weight weight, QueryCachingPolicy policy)Return a wrapper around the providedweightthat will cache matching docs per-segment accordingly to the givenpolicy.QueryCacheStatsgetStats(ShardId shard)Get usage statistics for the given shard.voidonClose(ShardId shardId)
-
-
-
Field Detail
-
INDICES_CACHE_QUERY_SIZE_SETTING
public static final Setting<ByteSizeValue> INDICES_CACHE_QUERY_SIZE_SETTING
-
INDICES_CACHE_QUERY_COUNT_SETTING
public static final Setting<Integer> INDICES_CACHE_QUERY_COUNT_SETTING
-
-
Constructor Detail
-
IndicesQueryCache
public IndicesQueryCache(Settings settings)
-
-
Method Detail
-
getStats
public QueryCacheStats getStats(ShardId shard)
Get usage statistics for the given shard.
-
doCache
public Weight doCache(Weight weight, QueryCachingPolicy policy)
Description copied from interface:QueryCacheReturn a wrapper around the providedweightthat will cache matching docs per-segment accordingly to the givenpolicy. NOTE: The returned weight will only be equivalent if scores are not needed.- Specified by:
doCachein interfaceQueryCache- See Also:
Collector.scoreMode()
-
clearIndex
public void clearIndex(String index)
Clear all entries that belong to the given index.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
onClose
public void onClose(ShardId shardId)
-
-