Adapt to changes in master

This commit is contained in:
Christoph Büscher 2016-07-01 15:03:17 +02:00
parent 3680069628
commit 42662fd695
1 changed files with 26 additions and 28 deletions

View File

@ -19,14 +19,12 @@
package org.elasticsearch.index.rankeval; package org.elasticsearch.index.rankeval;
import org.elasticsearch.client.Client; import org.elasticsearch.client.node.NodeClient;
import org.elasticsearch.common.ParseFieldMatcher; import org.elasticsearch.common.ParseFieldMatcher;
import org.elasticsearch.common.Strings; import org.elasticsearch.common.Strings;
import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.indices.query.IndicesQueriesRegistry; import org.elasticsearch.indices.query.IndicesQueriesRegistry;
import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestChannel;
@ -152,9 +150,9 @@ import static org.elasticsearch.rest.RestRequest.Method.POST;
public class RestRankEvalAction extends BaseRestHandler { public class RestRankEvalAction extends BaseRestHandler {
@Inject @Inject
public RestRankEvalAction(Settings settings, RestController controller, Client client, IndicesQueriesRegistry queryRegistry, public RestRankEvalAction(Settings settings, RestController controller, IndicesQueriesRegistry queryRegistry,
AggregatorParsers aggParsers, Suggesters suggesters) { AggregatorParsers aggParsers, Suggesters suggesters) {
super(settings, client); super(settings);
controller.registerHandler(GET, "/_rank_eval", this); controller.registerHandler(GET, "/_rank_eval", this);
controller.registerHandler(POST, "/_rank_eval", this); controller.registerHandler(POST, "/_rank_eval", this);
controller.registerHandler(GET, "/{index}/_rank_eval", this); controller.registerHandler(GET, "/{index}/_rank_eval", this);
@ -164,7 +162,7 @@ public class RestRankEvalAction extends BaseRestHandler {
} }
@Override @Override
public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws IOException { public void handleRequest(final RestRequest request, final RestChannel channel, final NodeClient client) throws IOException {
RankEvalRequest rankEvalRequest = new RankEvalRequest(); RankEvalRequest rankEvalRequest = new RankEvalRequest();
//parseRankEvalRequest(rankEvalRequest, request, parseFieldMatcher); //parseRankEvalRequest(rankEvalRequest, request, parseFieldMatcher);
//client.rankEval(rankEvalRequest, new RestStatusToXContentListener<>(channel)); //client.rankEval(rankEvalRequest, new RestStatusToXContentListener<>(channel));