diff --git a/pom.xml b/pom.xml index a86236a..8badc1b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.ansj elasticsearch-analysis-ansj - 8.10.4.0 + 8.11.0.0 elasticsearch analysis by ansj elasticsearch-analysis-ansj http://maven.nlpcn.org @@ -14,7 +14,7 @@ **/MainTestSuite.class elasticsearch-analysis-ansj 17 - 8.10.4 + 8.11.0 org.ansj.elasticsearch.plugin.AnalysisAnsjPlugin diff --git a/src/main/java/org/ansj/elasticsearch/action/TransportAnsjAction.java b/src/main/java/org/ansj/elasticsearch/action/TransportAnsjAction.java index 53c8586..c6916e3 100644 --- a/src/main/java/org/ansj/elasticsearch/action/TransportAnsjAction.java +++ b/src/main/java/org/ansj/elasticsearch/action/TransportAnsjAction.java @@ -68,7 +68,7 @@ public TransportAnsjAction(ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, AnsjElasticConfigurator cfg) { - super(AnsjAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, AnsjRequest::new, ThreadPool.Names.GENERIC); + super(AnsjAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, AnsjRequest::new, threadPool.executor(ThreadPool.Names.GENERIC)); this.cfg = cfg; } diff --git a/src/main/java/org/ansj/elasticsearch/plugin/AnalysisAnsjPlugin.java b/src/main/java/org/ansj/elasticsearch/plugin/AnalysisAnsjPlugin.java index a8b1c93..b000b84 100644 --- a/src/main/java/org/ansj/elasticsearch/plugin/AnalysisAnsjPlugin.java +++ b/src/main/java/org/ansj/elasticsearch/plugin/AnalysisAnsjPlugin.java @@ -37,8 +37,8 @@ import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestHandler; import org.elasticsearch.script.ScriptService; +import org.elasticsearch.telemetry.TelemetryProvider; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.tracing.Tracer; import org.elasticsearch.watcher.ResourceWatcherService; import org.elasticsearch.xcontent.NamedXContentRegistry; @@ -55,7 +55,7 @@ public class AnalysisAnsjPlugin extends Plugin implements AnalysisPlugin, Action private static final Logger LOG = LogManager.getLogger(); @Override - public Collection createComponents(Client client, ClusterService clusterService, ThreadPool threadPool, ResourceWatcherService resourceWatcherService, ScriptService scriptService, NamedXContentRegistry xContentRegistry, Environment environment, NodeEnvironment nodeEnvironment, NamedWriteableRegistry namedWriteableRegistry, IndexNameExpressionResolver indexNameExpressionResolver, Supplier repositoriesServiceSupplier, Tracer tracer, AllocationService allocationService, IndicesService indicesService) { + public Collection createComponents(Client client, ClusterService clusterService, ThreadPool threadPool, ResourceWatcherService resourceWatcherService, ScriptService scriptService, NamedXContentRegistry xContentRegistry, Environment environment, NodeEnvironment nodeEnvironment, NamedWriteableRegistry namedWriteableRegistry, IndexNameExpressionResolver indexNameExpressionResolver, Supplier repositoriesServiceSupplier, TelemetryProvider telemetryProvider, AllocationService allocationService, IndicesService indicesService) { return Collections.singletonList(new AnsjElasticConfigurator(environment)); }