From 1b128c140c45071cfd0bfe5d74100dcbd9dce91c Mon Sep 17 00:00:00 2001 From: carlosdelest Date: Fri, 27 Oct 2023 20:40:17 +0200 Subject: [PATCH] Fix merge with main --- .../main/java/org/elasticsearch/node/NodeConstruction.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/node/NodeConstruction.java b/server/src/main/java/org/elasticsearch/node/NodeConstruction.java index 1e547a405c65..b210407fea2a 100644 --- a/server/src/main/java/org/elasticsearch/node/NodeConstruction.java +++ b/server/src/main/java/org/elasticsearch/node/NodeConstruction.java @@ -121,6 +121,7 @@ import org.elasticsearch.indices.recovery.plan.RecoveryPlannerService; import org.elasticsearch.indices.recovery.plan.ShardSnapshotsService; import org.elasticsearch.inference.InferenceServiceRegistry; +import org.elasticsearch.ingest.FieldInferenceBulkRequestPreprocessor; import org.elasticsearch.ingest.IngestService; import org.elasticsearch.monitor.MonitorService; import org.elasticsearch.monitor.fs.FsHealthService; @@ -702,6 +703,10 @@ private void construct(Environment initialEnvironment, NodeServiceProvider servi searchModule.getRequestCacheKeyDifferentiator(), documentParsingObserverSupplier ); + final FieldInferenceBulkRequestPreprocessor fieldInferenceBulkRequestPreprocessor = new FieldInferenceBulkRequestPreprocessor( + documentParsingObserverSupplier, + client + ); final var parameters = new IndexSettingProvider.Parameters(indicesService::createIndexMapperServiceForValidation); IndexSettingProviders indexSettingProviders = new IndexSettingProviders( @@ -1076,6 +1081,7 @@ record PluginServiceInstances( b.bind(ScriptService.class).toInstance(scriptService); b.bind(AnalysisRegistry.class).toInstance(analysisModule.getAnalysisRegistry()); b.bind(IngestService.class).toInstance(ingestService); + b.bind(FieldInferenceBulkRequestPreprocessor.class).toInstance(fieldInferenceBulkRequestPreprocessor); b.bind(IndexingPressure.class).toInstance(indexingLimits); b.bind(UsageService.class).toInstance(usageService); b.bind(AggregationUsageService.class).toInstance(searchModule.getValuesSourceRegistry().getUsageService());