analysis-ik icon indicating copy to clipboard operation
analysis-ik copied to clipboard

org.elasticsearch.ElasticSearchIllegalArgumentException: failed to find analyzer

Open yanchenw opened this issue 14 years ago • 3 comments

Hi,

I am using elasticsearch 0.19.0 and installed ik analyzer as plugin: ./plugin -install medcl/elasticsearch-analysis-ik/1.0.0

My elasticsearch.yaml is like the following:

index: analysis: analyzer: ik: type: org.elasticsearch.index.analysis.IkAnalyzerProvider

Also I've downloaded the ik analyzer zip file and unzipped to %ESHOME%\config\ folder.

But when I issue the following command, the ElasticSearchIlegalArgumentException was thrown:

curl -XGET "localhost:9200/_analyze?analyzer=ik" -d "this is a test"

org.elasticsearch.ElasticSearchIllegalArgumentException: failed to find analyzer [ik] at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:147) at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:57) at org.elasticsearch.action.support.single.custom.TransportSingleCustomOperationAction$AsyncSingleAction$1.run(TransportSingleCustomOperationAction.java:143) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)

Seems like the ES cannot find the ik analyzer.

What maybe the issue here?

Thanks.

yanchenw avatar Mar 14 '12 11:03 yanchenw

1.after installed the plugin,you should restart the elasticsearch 2.you config is not correct,blank is needed,here is the one:

index:
  analysis:
    analyzer:      
      ik:
          alias: [news_analyzer, news_analyzer_ik,ik_analyzer]
          type: org.elasticsearch.index.analysis.IkAnalyzerProvider   

medcl avatar Mar 16 '12 03:03 medcl

closed

medcl avatar May 22 '12 10:05 medcl

The issue might be here. we should use this request with some specified index: curl -XGET 'localhost:9200/SOMEINDEX/_analyze?analyzer=ik&text=xxx'

linxabc avatar Apr 21 '15 09:04 linxabc