Adapt to changes on master
This commit is contained in:
parent
2fde4b2883
commit
63822c2745
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue