我安装ansj分析仪时遇到问题。 ansj分析器的安装代码为
./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-analysis-ansj/releases/download/v5.6.14/elasticsearch-analysis-ansj-5.6.14.0-release.zip
当我重新启动es时会遇到类似打击的错误
[2019-03-09T13:33:21,961][WARN ][o.e.g.Gateway ] [yWpGz-n] recovering index [test/xGf4Z4MZRKGsmR1jgifRxA] failed - recovering as closed
java.lang.UnsupportedOperationException: null
at java.util.Collections$UnmodifiableMap.putAll(Collections.java:1459) ~[?:?]
at org.ansj.elasticsearch.index.analysis.AnsjAnalyzerProvider.<init>(AnsjAnalyzerProvider.java:29) ~[?:?]
at org.ansj.elasticsearch.plugin.AnalysisAnsjPlugin.lambda$getAnalyzers$1(AnalysisAnsjPlugin.java:68) ~[?:?]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:361) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildAnalyzerFactories(AnalysisRegistry.java:186) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:156) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.IndexService.<init>(IndexService.java:145) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:363) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:448) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.indices.IndicesService.verifyIndexMetadata(IndicesService.java:481) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.gateway.Gateway.performStateRecovery(Gateway.java:135) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.gateway.GatewayService$1.doRun(GatewayService.java:229) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:675) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.14.jar:5.6.14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:844) [?:?]
[2019-03-09T13:33:21,969][WARN ][o.e.g.Gateway ] [yWpGz-n] recovering index [posts/Pq6hXAm_RWOsdU7q4O5hcA] failed - recovering as closed
java.lang.UnsupportedOperationException: null
at java.util.Collections$UnmodifiableMap.putAll(Collections.java:1459) ~[?:?]
at org.ansj.elasticsearch.index.analysis.AnsjAnalyzerProvider.<init>(AnsjAnalyzerProvider.java:29) ~[?:?]
at org.ansj.elasticsearch.plugin.AnalysisAnsjPlugin.lambda$getAnalyzers$1(AnalysisAnsjPlugin.java:68) ~[?:?]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:361) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildAnalyzerFactories(AnalysisRegistry.java:186) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:156) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.IndexService.<init>(IndexService.java:145) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:363) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:448) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.indices.IndicesService.verifyIndexMetadata(IndicesService.java:481) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.gateway.Gateway.performStateRecovery(Gateway.java:135) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.gateway.GatewayService$1.doRun(GatewayService.java:229) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:675) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.14.jar:5.6.14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:844) [?:?]
[2019-03-09T13:33:21,973][WARN ][o.e.g.Gateway ] [yWpGz-n] recovering index [mongodb_meta/wrf3B4xjRoGbFG3_GginsQ] failed - recovering as closed
java.lang.UnsupportedOperationException: null
at java.util.Collections$UnmodifiableMap.putAll(Collections.java:1459) ~[?:?]
at org.ansj.elasticsearch.index.analysis.AnsjAnalyzerProvider.<init>(AnsjAnalyzerProvider.java:29) ~[?:?]
at org.ansj.elasticsearch.plugin.AnalysisAnsjPlugin.lambda$getAnalyzers$1(AnalysisAnsjPlugin.java:68) ~[?:?]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:361) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.analysis.AnalysisRegistry.buildAnalyzerFactories(AnalysisRegistry.java:186) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:156) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.IndexService.<init>(IndexService.java:145) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:363) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:448) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.indices.IndicesService.verifyIndexMetadata(IndicesService.java:481) ~[elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.gateway.Gateway.performStateRecovery(Gateway.java:135) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.gateway.GatewayService$1.doRun(GatewayService.java:229) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:675) [elasticsearch-5.6.14.jar:5.6.14]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.14.jar:5.6.14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:844) [?:?]
[2019-03-09T13:33:22,092][INFO ][o.e.g.GatewayService ] [yWpGz-n] recovered [3] indices into cluster_state
和es索引状态就像打击
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
close posts Pq6hXAm_RWOsdU7q4O5hcA
close test xGf4Z4MZRKGsmR1jgifRxA
close mongodb_meta wrf3B4xjRoGbFG3_GginsQ
我想使用命令
curl -X POST "localhost:9200/_all/_open"
打开索引,但失败。响应为
{"error":{"root_cause":[{"type":"exception","reason":"Failed to verify index [posts/Pq6hXAm_RWOsdU7q4O5hcA]"}],"type":"exception","reason":"Failed to verify index [posts/Pq6hXAm_RWOsdU7q4O5hcA]","caused_by":{"type":"unsupported_operation_exception","reason":null}},"status":500}
那么,我该如何解决这个问题,