Adapt to changes on master

This commit is contained in:
Christoph Büscher 2016-09-12 12:05:17 +02:00
parent 2fde4b2883
commit 63822c2745
4 changed files with 14 additions and 9 deletions

View File

@ -23,6 +23,7 @@ import org.elasticsearch.common.ParseFieldMatcher;
import org.elasticsearch.common.ParseFieldMatcherSupplier;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.query.QueryParseContext;
import org.elasticsearch.search.SearchExtRegistry;
import org.elasticsearch.search.SearchRequestParsers;
import org.elasticsearch.search.aggregations.AggregatorParsers;
import org.elasticsearch.search.suggest.Suggesters;
@ -47,6 +48,10 @@ public class RankEvalContext implements ParseFieldMatcherSupplier {
return searchRequestParsers.aggParsers;
}
public SearchExtRegistry getSearchExtParsers() {
return searchRequestParsers.searchExtParsers;
}
@Override
public ParseFieldMatcher getParseFieldMatcher() {
return this.parseFieldMatcher;

View File

@ -155,7 +155,7 @@ public class RatedRequest extends ToXContentToBytes implements Writeable {
PARSER.declareString(RatedRequest::setSpecId, ID_FIELD);
PARSER.declareObject(RatedRequest::setTestRequest, (p, c) -> {
try {
return SearchSourceBuilder.fromXContent(c.getParseContext(), c.getAggs(), c.getSuggesters());
return SearchSourceBuilder.fromXContent(c.getParseContext(), c.getAggs(), c.getSuggesters(), c.getSearchExtParsers());
} catch (IOException ex) {
throw new ParsingException(p.getTokenLocation(), "error parsing request", ex);
}

View File

@ -53,7 +53,7 @@ public class RankEvalSpecTests extends ESTestCase {
searchModule = new SearchModule(Settings.EMPTY, false, emptyList());
IndicesQueriesRegistry queriesRegistry = searchModule.getQueryParserRegistry();
Suggesters suggesters = searchModule.getSuggesters();
searchRequestParsers = new SearchRequestParsers(queriesRegistry, aggsParsers, suggesters);
searchRequestParsers = new SearchRequestParsers(queriesRegistry, aggsParsers, suggesters, null);
}
@AfterClass

View File

@ -57,7 +57,7 @@ public class RatedRequestsTests extends ESTestCase {
searchModule = new SearchModule(Settings.EMPTY, false, emptyList());
IndicesQueriesRegistry queriesRegistry = searchModule.getQueryParserRegistry();
Suggesters suggesters = searchModule.getSuggesters();
searchRequestParsers = new SearchRequestParsers(queriesRegistry, aggsParsers, suggesters);
searchRequestParsers = new SearchRequestParsers(queriesRegistry, aggsParsers, suggesters, null);
}
@AfterClass