Package org.elasticsearch.indices
Class IndicesQueryCache
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.indices.IndicesQueryCache
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.lucene.search.QueryCache
public class IndicesQueryCache extends AbstractComponent implements org.apache.lucene.search.QueryCache, java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Integer>INDICES_CACHE_QUERY_COUNT_SETTINGstatic Setting<ByteSizeValue>INDICES_CACHE_QUERY_SIZE_SETTINGstatic Setting<java.lang.Boolean>INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
-
Constructor Summary
Constructors Constructor Description IndicesQueryCache(Settings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearIndex(java.lang.String index)Clear all entries that belong to the given index.voidclose()org.apache.lucene.search.WeightdoCache(org.apache.lucene.search.Weight weight, org.apache.lucene.search.QueryCachingPolicy policy)QueryCacheStatsgetStats(ShardId shard)Get usage statistics for the given shard.voidonClose(ShardId shardId)-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
-
-
-
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<java.lang.Integer> INDICES_CACHE_QUERY_COUNT_SETTING
-
INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING
public static final Setting<java.lang.Boolean> INDICES_QUERIES_CACHE_ALL_SEGMENTS_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 org.apache.lucene.search.Weight doCache(org.apache.lucene.search.Weight weight, org.apache.lucene.search.QueryCachingPolicy policy)- Specified by:
doCachein interfaceorg.apache.lucene.search.QueryCache
-
clearIndex
public void clearIndex(java.lang.String index)
Clear all entries that belong to the given index.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
onClose
public void onClose(ShardId shardId)
-
-