diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIndices.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIndices.java
index f2a1dd6e587..2a36a7833cd 100644
--- a/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIndices.java
+++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIndices.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.io.stream.Streamable;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilderString;
-import org.elasticsearch.index.cache.filter.FilterCacheStats;
+import org.elasticsearch.index.cache.query.QueryCacheStats;
import org.elasticsearch.index.engine.SegmentsStats;
import org.elasticsearch.index.fielddata.FieldDataStats;
import org.elasticsearch.index.percolator.stats.PercolateStats;
@@ -46,7 +46,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
private DocsStats docs;
private StoreStats store;
private FieldDataStats fieldData;
- private FilterCacheStats filterCache;
+ private QueryCacheStats queryCache;
private CompletionStats completion;
private SegmentsStats segments;
private PercolateStats percolate;
@@ -60,7 +60,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
this.docs = new DocsStats();
this.store = new StoreStats();
this.fieldData = new FieldDataStats();
- this.filterCache = new FilterCacheStats();
+ this.queryCache = new QueryCacheStats();
this.completion = new CompletionStats();
this.segments = new SegmentsStats();
this.percolate = new PercolateStats();
@@ -83,7 +83,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
}
store.add(shardCommonStats.store);
fieldData.add(shardCommonStats.fieldData);
- filterCache.add(shardCommonStats.filterCache);
+ queryCache.add(shardCommonStats.queryCache);
completion.add(shardCommonStats.completion);
segments.add(shardCommonStats.segments);
percolate.add(shardCommonStats.percolate);
@@ -117,8 +117,8 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
return fieldData;
}
- public FilterCacheStats getFilterCache() {
- return filterCache;
+ public QueryCacheStats getQueryCache() {
+ return queryCache;
}
public CompletionStats getCompletion() {
@@ -140,7 +140,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
docs = DocsStats.readDocStats(in);
store = StoreStats.readStoreStats(in);
fieldData = FieldDataStats.readFieldDataStats(in);
- filterCache = FilterCacheStats.readFilterCacheStats(in);
+ queryCache = QueryCacheStats.readFilterCacheStats(in);
completion = CompletionStats.readCompletionStats(in);
segments = SegmentsStats.readSegmentsStats(in);
percolate = PercolateStats.readPercolateStats(in);
@@ -153,7 +153,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
docs.writeTo(out);
store.writeTo(out);
fieldData.writeTo(out);
- filterCache.writeTo(out);
+ queryCache.writeTo(out);
completion.writeTo(out);
segments.writeTo(out);
percolate.writeTo(out);
@@ -176,7 +176,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
docs.toXContent(builder, params);
store.toXContent(builder, params);
fieldData.toXContent(builder, params);
- filterCache.toXContent(builder, params);
+ queryCache.toXContent(builder, params);
completion.toXContent(builder, params);
segments.toXContent(builder, params);
percolate.toXContent(builder, params);
diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java
index 40c1c8b9e74..57b8f3956b3 100644
--- a/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java
+++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java
@@ -55,7 +55,7 @@ public class TransportClusterStatsAction extends TransportNodesAction {
private static final CommonStatsFlags SHARD_STATS_FLAGS = new CommonStatsFlags(CommonStatsFlags.Flag.Docs, CommonStatsFlags.Flag.Store,
- CommonStatsFlags.Flag.FieldData, CommonStatsFlags.Flag.FilterCache, CommonStatsFlags.Flag.Completion, CommonStatsFlags.Flag.Segments,
+ CommonStatsFlags.Flag.FieldData, CommonStatsFlags.Flag.QueryCache, CommonStatsFlags.Flag.Completion, CommonStatsFlags.Flag.Segments,
CommonStatsFlags.Flag.Percolate);
private final NodeService nodeService;
diff --git a/core/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java b/core/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java
index cf471ab0c77..a5563d6b872 100644
--- a/core/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java
+++ b/core/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java
@@ -30,10 +30,10 @@ import java.io.IOException;
*/
public class ClearIndicesCacheRequest extends BroadcastRequest {
- private boolean filterCache = false;
+ private boolean queryCache = false;
private boolean fieldDataCache = false;
private boolean recycler = false;
- private boolean queryCache = false;
+ private boolean requestCache = false;
private String[] fields = null;
@@ -44,17 +44,8 @@ public class ClearIndicesCacheRequest extends BroadcastRequest {
private final IndicesService indicesService;
- private final IndicesQueryCache indicesQueryCache;
+ private final IndicesRequestCache indicesRequestCache;
@Inject
public TransportClearIndicesCacheAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
TransportService transportService, IndicesService indicesService,
- IndicesQueryCache indicesQueryCache, ActionFilters actionFilters) {
+ IndicesRequestCache indicesQueryCache, ActionFilters actionFilters) {
super(settings, ClearIndicesCacheAction.NAME, threadPool, clusterService, transportService, actionFilters,
ClearIndicesCacheRequest.class, ShardClearIndicesCacheRequest.class, ThreadPool.Names.MANAGEMENT);
this.indicesService = indicesService;
- this.indicesQueryCache = indicesQueryCache;
+ this.indicesRequestCache = indicesQueryCache;
}
@Override
@@ -100,9 +100,9 @@ public class TransportClearIndicesCacheAction extends TransportBroadcastAction {
return flags.isSet(Flag.Warmer);
}
- public IndicesStatsRequest filterCache(boolean filterCache) {
- flags.set(Flag.FilterCache, filterCache);
+ public IndicesStatsRequest queryCache(boolean queryCache) {
+ flags.set(Flag.QueryCache, queryCache);
return this;
}
- public boolean filterCache() {
- return flags.isSet(Flag.FilterCache);
+ public boolean queryCache() {
+ return flags.isSet(Flag.QueryCache);
}
public IndicesStatsRequest fieldData(boolean fieldData) {
@@ -247,13 +247,13 @@ public class IndicesStatsRequest extends BroadcastRequest {
return flags.isSet(Flag.Suggest);
}
- public IndicesStatsRequest queryCache(boolean queryCache) {
- flags.set(Flag.QueryCache, queryCache);
+ public IndicesStatsRequest requestCache(boolean requestCache) {
+ flags.set(Flag.RequestCache, requestCache);
return this;
}
- public boolean queryCache() {
- return flags.isSet(Flag.QueryCache);
+ public boolean requestCache() {
+ return flags.isSet(Flag.RequestCache);
}
public IndicesStatsRequest recovery(boolean recovery) {
diff --git a/core/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java b/core/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java
index fb342119d3e..8e78c548e37 100644
--- a/core/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java
+++ b/core/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java
@@ -112,8 +112,8 @@ public class IndicesStatsRequestBuilder extends BroadcastOperationRequestBuilder
return this;
}
- public IndicesStatsRequestBuilder setFilterCache(boolean filterCache) {
- request.filterCache(filterCache);
+ public IndicesStatsRequestBuilder setQueryCache(boolean queryCache) {
+ request.queryCache(queryCache);
return this;
}
@@ -157,8 +157,8 @@ public class IndicesStatsRequestBuilder extends BroadcastOperationRequestBuilder
return this;
}
- public IndicesStatsRequestBuilder setQueryCache(boolean queryCache) {
- request.queryCache(queryCache);
+ public IndicesStatsRequestBuilder setRequestCache(boolean requestCache) {
+ request.requestCache(requestCache);
return this;
}
diff --git a/core/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java b/core/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java
index b4b0d6a4435..c6cf00dfbc0 100644
--- a/core/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java
+++ b/core/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java
@@ -157,8 +157,8 @@ public class TransportIndicesStatsAction extends TransportBroadcastAction
* Index warming allows to run registered search requests to warm up the index before it is available for search.
* With the near real time aspect of search, cold data (segments) will be warmed up before they become available for
- * search. This includes things such as the filter cache, filesystem cache, and loading field data for fields.
+ * search. This includes things such as the query cache, filesystem cache, and loading field data for fields.
*
*
* @see the reference guide for more detailed information about the Indices / Search Warmer
*/
-package org.elasticsearch.action.admin.indices.warmer;
\ No newline at end of file
+package org.elasticsearch.action.admin.indices.warmer;
diff --git a/core/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java b/core/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java
index 0b11e0bcf5d..6fa22e68a87 100644
--- a/core/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java
+++ b/core/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java
@@ -132,21 +132,21 @@ public class TransportPutWarmerAction extends TransportMasterNodeAction entries = new ArrayList<>(warmers.entries().size() + 1);
for (IndexWarmersMetaData.Entry entry : warmers.entries()) {
if (entry.name().equals(request.name())) {
found = true;
- entries.add(new IndexWarmersMetaData.Entry(request.name(), request.searchRequest().types(), request.searchRequest().queryCache(), source));
+ entries.add(new IndexWarmersMetaData.Entry(request.name(), request.searchRequest().types(), request.searchRequest().requestCache(), source));
} else {
entries.add(entry);
}
}
if (!found) {
logger.info("[{}] put warmer [{}]", index, request.name());
- entries.add(new IndexWarmersMetaData.Entry(request.name(), request.searchRequest().types(), request.searchRequest().queryCache(), source));
+ entries.add(new IndexWarmersMetaData.Entry(request.name(), request.searchRequest().types(), request.searchRequest().requestCache(), source));
} else {
logger.info("[{}] update warmer [{}]", index, request.name());
}
diff --git a/core/src/main/java/org/elasticsearch/action/search/SearchRequest.java b/core/src/main/java/org/elasticsearch/action/search/SearchRequest.java
index 3d4c08aa96f..1b6a4f2e1f5 100644
--- a/core/src/main/java/org/elasticsearch/action/search/SearchRequest.java
+++ b/core/src/main/java/org/elasticsearch/action/search/SearchRequest.java
@@ -76,7 +76,7 @@ public class SearchRequest extends ActionRequest implements Indic
private BytesReference source;
private BytesReference extraSource;
- private Boolean queryCache;
+ private Boolean requestCache;
private Scroll scroll;
@@ -103,7 +103,7 @@ public class SearchRequest extends ActionRequest implements Indic
this.template = searchRequest.template;
this.source = searchRequest.source;
this.extraSource = searchRequest.extraSource;
- this.queryCache = searchRequest.queryCache;
+ this.requestCache = searchRequest.requestCache;
this.scroll = searchRequest.scroll;
this.types = searchRequest.types;
this.indicesOptions = searchRequest.indicesOptions;
@@ -533,12 +533,12 @@ public class SearchRequest extends ActionRequest implements Indic
* will default to the index level setting if query cache is enabled or not).
*/
public SearchRequest queryCache(Boolean queryCache) {
- this.queryCache = queryCache;
+ this.requestCache = queryCache;
return this;
}
- public Boolean queryCache() {
- return this.queryCache;
+ public Boolean requestCache() {
+ return this.requestCache;
}
@Override
@@ -568,7 +568,7 @@ public class SearchRequest extends ActionRequest implements Indic
if (in.readBoolean()) {
template = Template.readTemplate(in);
}
- queryCache = in.readOptionalBoolean();
+ requestCache = in.readOptionalBoolean();
}
@Override
@@ -602,6 +602,6 @@ public class SearchRequest extends ActionRequest implements Indic
template.writeTo(out);
}
- out.writeOptionalBoolean(queryCache);
+ out.writeOptionalBoolean(requestCache);
}
}
diff --git a/core/src/main/java/org/elasticsearch/common/joda/DateMathParser.java b/core/src/main/java/org/elasticsearch/common/joda/DateMathParser.java
index 7fa1947a501..16be9cea211 100644
--- a/core/src/main/java/org/elasticsearch/common/joda/DateMathParser.java
+++ b/core/src/main/java/org/elasticsearch/common/joda/DateMathParser.java
@@ -49,7 +49,7 @@ public class DateMathParser {
}
// Note: we take a callable here for the timestamp in order to be able to figure out
- // if it has been used. For instance, the query cache does not cache queries that make
+ // if it has been used. For instance, the request cache does not cache requests that make
// use of `now`.
public long parse(String text, Callable now, boolean roundUp, DateTimeZone timeZone) {
long time;
diff --git a/core/src/main/java/org/elasticsearch/index/IndexService.java b/core/src/main/java/org/elasticsearch/index/IndexService.java
index e23a623add0..560105455ab 100644
--- a/core/src/main/java/org/elasticsearch/index/IndexService.java
+++ b/core/src/main/java/org/elasticsearch/index/IndexService.java
@@ -52,7 +52,7 @@ import org.elasticsearch.index.translog.TranslogService;
import org.elasticsearch.indices.IndicesLifecycle;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.indices.InternalIndicesLifecycle;
-import org.elasticsearch.indices.cache.filter.IndicesFilterCache;
+import org.elasticsearch.indices.cache.query.IndicesQueryCache;
import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.plugins.ShardsPluginsModule;
@@ -309,7 +309,7 @@ public class IndexService extends AbstractIndexComponent implements IndexCompone
new StoreCloseListener(shardId, canDeleteShardContent, new Closeable() {
@Override
public void close() throws IOException {
- injector.getInstance(IndicesFilterCache.class).onClose(shardId);
+ injector.getInstance(IndicesQueryCache.class).onClose(shardId);
}
}), path));
modules.add(new DeletionPolicyModule(indexSettings));
diff --git a/core/src/main/java/org/elasticsearch/index/cache/IndexCache.java b/core/src/main/java/org/elasticsearch/index/cache/IndexCache.java
index 3b71f735c2e..afb75cf50b5 100644
--- a/core/src/main/java/org/elasticsearch/index/cache/IndexCache.java
+++ b/core/src/main/java/org/elasticsearch/index/cache/IndexCache.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.cache.bitset.BitsetFilterCache;
-import org.elasticsearch.index.cache.filter.FilterCache;
+import org.elasticsearch.index.cache.query.QueryCache;
import org.elasticsearch.index.settings.IndexSettings;
import java.io.Closeable;
@@ -37,24 +37,24 @@ import java.io.IOException;
*/
public class IndexCache extends AbstractIndexComponent implements Closeable {
- private final FilterCache filterCache;
- private final QueryCachingPolicy filterCachingPolicy;
+ private final QueryCache queryCache;
+ private final QueryCachingPolicy queryCachingPolicy;
private final BitsetFilterCache bitsetFilterCache;
@Inject
- public IndexCache(Index index, @IndexSettings Settings indexSettings, FilterCache filterCache, QueryCachingPolicy filterCachingPolicy, BitsetFilterCache bitsetFilterCache) {
+ public IndexCache(Index index, @IndexSettings Settings indexSettings, QueryCache queryCache, QueryCachingPolicy queryCachingPolicy, BitsetFilterCache bitsetFilterCache) {
super(index, indexSettings);
- this.filterCache = filterCache;
- this.filterCachingPolicy = filterCachingPolicy;
+ this.queryCache = queryCache;
+ this.queryCachingPolicy = queryCachingPolicy;
this.bitsetFilterCache = bitsetFilterCache;
}
- public FilterCache filter() {
- return filterCache;
+ public QueryCache query() {
+ return queryCache;
}
- public QueryCachingPolicy filterPolicy() {
- return filterCachingPolicy;
+ public QueryCachingPolicy queryPolicy() {
+ return queryCachingPolicy;
}
/**
@@ -66,11 +66,11 @@ public class IndexCache extends AbstractIndexComponent implements Closeable {
@Override
public void close() throws IOException {
- IOUtils.close(filterCache, bitsetFilterCache);
+ IOUtils.close(queryCache, bitsetFilterCache);
}
public void clear(String reason) {
- filterCache.clear(reason);
+ queryCache.clear(reason);
bitsetFilterCache.clear(reason);
}
diff --git a/core/src/main/java/org/elasticsearch/index/cache/IndexCacheModule.java b/core/src/main/java/org/elasticsearch/index/cache/IndexCacheModule.java
index 3a0c9fc584e..43ddbf7cef1 100644
--- a/core/src/main/java/org/elasticsearch/index/cache/IndexCacheModule.java
+++ b/core/src/main/java/org/elasticsearch/index/cache/IndexCacheModule.java
@@ -22,7 +22,7 @@ package org.elasticsearch.index.cache;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.cache.bitset.BitsetFilterCacheModule;
-import org.elasticsearch.index.cache.filter.FilterCacheModule;
+import org.elasticsearch.index.cache.query.QueryCacheModule;
/**
*
@@ -37,7 +37,7 @@ public class IndexCacheModule extends AbstractModule {
@Override
protected void configure() {
- new FilterCacheModule(settings).configure(binder());
+ new QueryCacheModule(settings).configure(binder());
new BitsetFilterCacheModule(settings).configure(binder());
bind(IndexCache.class).asEagerSingleton();
diff --git a/core/src/main/java/org/elasticsearch/index/cache/bitset/BitsetFilterCache.java b/core/src/main/java/org/elasticsearch/index/cache/bitset/BitsetFilterCache.java
index 7bf252f235a..2203c94bd5a 100644
--- a/core/src/main/java/org/elasticsearch/index/cache/bitset/BitsetFilterCache.java
+++ b/core/src/main/java/org/elasticsearch/index/cache/bitset/BitsetFilterCache.java
@@ -67,7 +67,7 @@ import java.util.concurrent.Executor;
*
* Use this cache with care, only components that require that a filter is to be materialized as a {@link BitDocIdSet}
* and require that it should always be around should use this cache, otherwise the
- * {@link org.elasticsearch.index.cache.filter.FilterCache} should be used instead.
+ * {@link org.elasticsearch.index.cache.query.QueryCache} should be used instead.
*/
public class BitsetFilterCache extends AbstractIndexComponent implements LeafReader.CoreClosedListener, RemovalListener