summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/rest/action/document
diff options
context:
space:
mode:
authorNik Everett <nik9000@gmail.com>2016-12-21 09:05:14 -0500
committerGitHub <noreply@github.com>2016-12-21 09:05:14 -0500
commit567c65b0d57e92cd530dafa7f55de7ba681af13e (patch)
tree12ace101209a6ab795bc3c6748db80b1869bd744 /core/src/main/java/org/elasticsearch/rest/action/document
parent80f8dfe852ceaa012433b8e46c33f75fd1efe507 (diff)
Replace IndicesQueriesRegistry (#22289)
* Switch query parsing to namedObject * Remove IndicesQueriesRegistry
Diffstat (limited to 'core/src/main/java/org/elasticsearch/rest/action/document')
-rw-r--r--core/src/main/java/org/elasticsearch/rest/action/document/RestCountAction.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/core/src/main/java/org/elasticsearch/rest/action/document/RestCountAction.java b/core/src/main/java/org/elasticsearch/rest/action/document/RestCountAction.java
index 2983879961..86acb1fb1b 100644
--- a/core/src/main/java/org/elasticsearch/rest/action/document/RestCountAction.java
+++ b/core/src/main/java/org/elasticsearch/rest/action/document/RestCountAction.java
@@ -19,7 +19,6 @@
package org.elasticsearch.rest.action.document;
-import org.apache.lucene.util.IOUtils;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.IndicesOptions;
@@ -28,9 +27,7 @@ import org.elasticsearch.common.Strings;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.query.QueryBuilder;
-import org.elasticsearch.indices.query.IndicesQueriesRegistry;
import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.BytesRestResponse;
import org.elasticsearch.rest.RestController;
@@ -48,11 +45,8 @@ import static org.elasticsearch.rest.action.RestActions.buildBroadcastShardsHead
import static org.elasticsearch.search.internal.SearchContext.DEFAULT_TERMINATE_AFTER;
public class RestCountAction extends BaseRestHandler {
-
- private final IndicesQueriesRegistry indicesQueriesRegistry;
-
@Inject
- public RestCountAction(Settings settings, RestController controller, IndicesQueriesRegistry indicesQueriesRegistry) {
+ public RestCountAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(POST, "/_count", this);
controller.registerHandler(GET, "/_count", this);
@@ -60,7 +54,6 @@ public class RestCountAction extends BaseRestHandler {
controller.registerHandler(GET, "/{index}/_count", this);
controller.registerHandler(POST, "/{index}/{type}/_count", this);
controller.registerHandler(GET, "/{index}/{type}/_count", this);
- this.indicesQueriesRegistry = indicesQueriesRegistry;
}
@Override
@@ -76,7 +69,7 @@ public class RestCountAction extends BaseRestHandler {
searchSourceBuilder.query(queryBuilder);
}
} else {
- searchSourceBuilder.query(RestActions.getQueryContent(parser, indicesQueriesRegistry, parseFieldMatcher));
+ searchSourceBuilder.query(RestActions.getQueryContent(parser, parseFieldMatcher));
}
});
countRequest.routing(request.param("routing"));