Fix compile issues after merging in master.
This commit is contained in:
parent
b2e8455745
commit
6d1a658106
|
@ -187,14 +187,11 @@ public class RestRankEvalAction extends BaseRestHandler {
|
||||||
@Override
|
@Override
|
||||||
protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {
|
protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {
|
||||||
RankEvalRequest rankEvalRequest = new RankEvalRequest();
|
RankEvalRequest rankEvalRequest = new RankEvalRequest();
|
||||||
BytesReference restContent = RestActions.hasBodyContent(request) ? RestActions.getRestContent(request) : null;
|
try (XContentParser parser = request.contentOrSourceParamParser()) {
|
||||||
try (XContentParser parser = XContentFactory.xContent(restContent).createParser(restContent)) {
|
|
||||||
QueryParseContext parseContext = new QueryParseContext(searchRequestParsers.queryParsers, parser, parseFieldMatcher);
|
QueryParseContext parseContext = new QueryParseContext(searchRequestParsers.queryParsers, parser, parseFieldMatcher);
|
||||||
if (restContent != null) {
|
// TODO can we get rid of aggregators parsers and suggesters?
|
||||||
parseRankEvalRequest(rankEvalRequest, request,
|
parseRankEvalRequest(rankEvalRequest, request,
|
||||||
// TODO can we get rid of aggregators parsers and suggesters?
|
new RankEvalContext(parseFieldMatcher, parseContext, searchRequestParsers, scriptService));
|
||||||
new RankEvalContext(parseFieldMatcher, parseContext, searchRequestParsers, scriptService));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return channel -> client.executeLocally(RankEvalAction.INSTANCE, rankEvalRequest,
|
return channel -> client.executeLocally(RankEvalAction.INSTANCE, rankEvalRequest,
|
||||||
new RestToXContentListener<RankEvalResponse>(channel));
|
new RestToXContentListener<RankEvalResponse>(channel));
|
||||||
|
|
Loading…
Reference in New Issue