Hande SearchExtParsers replaced by namedObject
Original commit: elastic/x-pack-elasticsearch@9691f9b772
This commit is contained in:
parent
a0090ac556
commit
c597d37fbb
|
@ -75,7 +75,7 @@ public class WatcherSearchTemplateService extends AbstractComponent {
|
||||||
if (source != null && source.length() > 0) {
|
if (source != null && source.length() > 0) {
|
||||||
try (XContentParser parser = XContentFactory.xContent(source).createParser(xContentRegistry, source)) {
|
try (XContentParser parser = XContentFactory.xContent(source).createParser(xContentRegistry, source)) {
|
||||||
sourceBuilder.parseXContent(new QueryParseContext(parser, parseFieldMatcher),
|
sourceBuilder.parseXContent(new QueryParseContext(parser, parseFieldMatcher),
|
||||||
searchRequestParsers.aggParsers, searchRequestParsers.suggesters, searchRequestParsers.searchExtParsers);
|
searchRequestParsers.aggParsers, searchRequestParsers.suggesters);
|
||||||
searchRequest.source(sourceBuilder);
|
searchRequest.source(sourceBuilder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class SearchInputTests extends ESIntegTestCase {
|
||||||
XContentParser parser = createParser(builder);
|
XContentParser parser = createParser(builder);
|
||||||
parser.nextToken();
|
parser.nextToken();
|
||||||
|
|
||||||
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null, null);
|
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
|
||||||
SearchInputFactory factory = new SearchInputFactory(Settings.EMPTY, WatcherClientProxy.of(client()),
|
SearchInputFactory factory = new SearchInputFactory(Settings.EMPTY, WatcherClientProxy.of(client()),
|
||||||
searchParsers, xContentRegistry(), scriptService());
|
searchParsers, xContentRegistry(), scriptService());
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ public class WatchTests extends ESTestCase {
|
||||||
ActionRegistry actionRegistry = registry(Collections.emptyList(), conditionRegistry, transformRegistry);
|
ActionRegistry actionRegistry = registry(Collections.emptyList(), conditionRegistry, transformRegistry);
|
||||||
Watch.Parser watchParser = new Watch.Parser(settings, triggerService, actionRegistry, inputRegistry, null, Clock.systemUTC());
|
Watch.Parser watchParser = new Watch.Parser(settings, triggerService, actionRegistry, inputRegistry, null, Clock.systemUTC());
|
||||||
|
|
||||||
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null, null);
|
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
|
||||||
WatcherSearchTemplateService searchTemplateService = new WatcherSearchTemplateService(settings, scriptService, searchParsers,
|
WatcherSearchTemplateService searchTemplateService = new WatcherSearchTemplateService(settings, scriptService, searchParsers,
|
||||||
xContentRegistry());
|
xContentRegistry());
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ public class WatchTests extends ESTestCase {
|
||||||
Map<String, InputFactory> parsers = new HashMap<>();
|
Map<String, InputFactory> parsers = new HashMap<>();
|
||||||
switch (inputType) {
|
switch (inputType) {
|
||||||
case SearchInput.TYPE:
|
case SearchInput.TYPE:
|
||||||
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null, null);
|
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
|
||||||
parsers.put(SearchInput.TYPE, new SearchInputFactory(settings, client, searchParsers, xContentRegistry(), scriptService));
|
parsers.put(SearchInput.TYPE, new SearchInputFactory(settings, client, searchParsers, xContentRegistry(), scriptService));
|
||||||
return new InputRegistry(Settings.EMPTY, parsers);
|
return new InputRegistry(Settings.EMPTY, parsers);
|
||||||
default:
|
default:
|
||||||
|
@ -457,7 +457,7 @@ public class WatchTests extends ESTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private TransformRegistry transformRegistry() {
|
private TransformRegistry transformRegistry() {
|
||||||
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null, null);
|
SearchRequestParsers searchParsers = new SearchRequestParsers(null, null);
|
||||||
Map<String, TransformFactory> factories = new HashMap<>();
|
Map<String, TransformFactory> factories = new HashMap<>();
|
||||||
factories.put(ScriptTransform.TYPE, new ScriptTransformFactory(settings, scriptService));
|
factories.put(ScriptTransform.TYPE, new ScriptTransformFactory(settings, scriptService));
|
||||||
factories.put(SearchTransform.TYPE, new SearchTransformFactory(settings, client, searchParsers, xContentRegistry(), scriptService));
|
factories.put(SearchTransform.TYPE, new SearchTransformFactory(settings, client, searchParsers, xContentRegistry(), scriptService));
|
||||||
|
|
Loading…
Reference in New Issue