summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java')
-rw-r--r--core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java17
1 files changed, 4 insertions, 13 deletions
diff --git a/core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java b/core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java
index 77aa1dc0c3..b516e44ea2 100644
--- a/core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java
+++ b/core/src/main/java/org/elasticsearch/index/query/QueryShardContext.java
@@ -20,6 +20,7 @@
package org.elasticsearch.index.query;
import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.index.IndexReader;
import org.apache.lucene.queryparser.classic.MapperQueryParser;
import org.apache.lucene.queryparser.classic.QueryParserSettings;
import org.apache.lucene.search.Query;
@@ -95,8 +96,8 @@ public class QueryShardContext extends QueryRewriteContext {
boolean isFilter; // pkg private for testing
public QueryShardContext(IndexSettings indexSettings, BitsetFilterCache bitsetFilterCache, IndexFieldDataService indexFieldDataService, MapperService mapperService, SimilarityService similarityService, ScriptService scriptService,
- final IndicesQueriesRegistry indicesQueriesRegistry, PercolatorQueryCache percolatorQueryCache) {
- super(indexSettings, scriptService, indicesQueriesRegistry);
+ final IndicesQueriesRegistry indicesQueriesRegistry, PercolatorQueryCache percolatorQueryCache, IndexReader reader) {
+ super(indexSettings, mapperService, scriptService, indicesQueriesRegistry, reader);
this.indexSettings = indexSettings;
this.similarityService = similarityService;
this.mapperService = mapperService;
@@ -109,16 +110,10 @@ public class QueryShardContext extends QueryRewriteContext {
}
public QueryShardContext(QueryShardContext source) {
- this(source.indexSettings, source.bitsetFilterCache, source.indexFieldDataService, source.mapperService, source.similarityService, source.scriptService, source.indicesQueriesRegistry, source.percolatorQueryCache);
+ this(source.indexSettings, source.bitsetFilterCache, source.indexFieldDataService, source.mapperService, source.similarityService, source.scriptService, source.indicesQueriesRegistry, source.percolatorQueryCache, source.reader);
this.types = source.getTypes();
}
-
- @Override
- public QueryShardContext clone() {
- return new QueryShardContext(indexSettings, bitsetFilterCache, indexFieldDataService, mapperService, similarityService, scriptService, indicesQueriesRegistry, percolatorQueryCache);
- }
-
public void parseFieldMatcher(ParseFieldMatcher parseFieldMatcher) {
this.parseContext.parseFieldMatcher(parseFieldMatcher);
}
@@ -145,10 +140,6 @@ public class QueryShardContext extends QueryRewriteContext {
return mapperService.analysisService();
}
- public MapperService getMapperService() {
- return mapperService;
- }
-
public PercolatorQueryCache getPercolatorQueryCache() {
return percolatorQueryCache;
}