Handle core moving Aggregation parsing to namedObject

Original commit: elastic/x-pack-elasticsearch@a968c54e86
This commit is contained in:
Nik Everett 2017-01-09 13:05:56 -05:00
parent c597d37fbb
commit ac260505af
3 changed files with 5 additions and 5 deletions

View File

@ -75,7 +75,7 @@ public class WatcherSearchTemplateService extends AbstractComponent {
if (source != null && source.length() > 0) {
try (XContentParser parser = XContentFactory.xContent(source).createParser(xContentRegistry, source)) {
sourceBuilder.parseXContent(new QueryParseContext(parser, parseFieldMatcher),
searchRequestParsers.aggParsers, searchRequestParsers.suggesters);
searchRequestParsers.suggesters);
searchRequest.source(sourceBuilder);
}
}

View File

@ -144,7 +144,7 @@ public class SearchInputTests extends ESIntegTestCase {
XContentParser parser = createParser(builder);
parser.nextToken();
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
SearchRequestParsers searchParsers = new SearchRequestParsers(null);
SearchInputFactory factory = new SearchInputFactory(Settings.EMPTY, WatcherClientProxy.of(client()),
searchParsers, xContentRegistry(), scriptService());

View File

@ -288,7 +288,7 @@ public class WatchTests extends ESTestCase {
ActionRegistry actionRegistry = registry(Collections.emptyList(), conditionRegistry, transformRegistry);
Watch.Parser watchParser = new Watch.Parser(settings, triggerService, actionRegistry, inputRegistry, null, Clock.systemUTC());
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
SearchRequestParsers searchParsers = new SearchRequestParsers(null);
WatcherSearchTemplateService searchTemplateService = new WatcherSearchTemplateService(settings, scriptService, searchParsers,
xContentRegistry());
@ -409,7 +409,7 @@ public class WatchTests extends ESTestCase {
Map<String, InputFactory> parsers = new HashMap<>();
switch (inputType) {
case SearchInput.TYPE:
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
SearchRequestParsers searchParsers = new SearchRequestParsers(null);
parsers.put(SearchInput.TYPE, new SearchInputFactory(settings, client, searchParsers, xContentRegistry(), scriptService));
return new InputRegistry(Settings.EMPTY, parsers);
default:
@ -457,7 +457,7 @@ public class WatchTests extends ESTestCase {
}
private TransformRegistry transformRegistry() {
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
SearchRequestParsers searchParsers = new SearchRequestParsers(null);
Map<String, TransformFactory> factories = new HashMap<>();
factories.put(ScriptTransform.TYPE, new ScriptTransformFactory(settings, scriptService));
factories.put(SearchTransform.TYPE, new SearchTransformFactory(settings, client, searchParsers, xContentRegistry(), scriptService));