ICU analysis plugin with elasticsearch 1.7.1


(Arun Agarwal) #1

Hey
i am trying to use icu analysis 2.7.0 with elasticsearch 1.7.1
every time i try to run analyze API on a field i get the following error
"error":"NoClassDefFoundError[Could not initialize class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig]","status":500}

There is no log about this in the logs.
My analyzer settings are
"tokenized" : {
"type" : "custom",
"filter" : [
"word_delimiter",
"lowercase",
"icu_normalizer",
"icu_folding",
"eng_stm",
"edge_ngram"
],
"tokenizer" : "icu_tokenizer"
},

I ll be able to provide any more information if needed.

At the sametime icu_collation works on the same index.


(David Pilato) #2

Can you describe all the steps?

How do you install the plugin?
Do you restart?

All REST calls...

Thanks!


(Arun Agarwal) #3

Installation,

We copy the jar related to the plugin into the plugins/analysis-icu directory.
After this we bring up elasticsearch

We dont use the /bin/plugin to install, as copying the jar worked for us, for previous versions of the same plugin and elasticsearch combination.


(David Pilato) #4

That can not work. You need to download the zip file and extract all its content.

 bin/plugin 

Does that.


(Arun Agarwal) #5

Is this a new change with 1.7.1, because i have elasticsearch 1.5.4 running in our production system with analysis-icu 2.5, and it followed the same steps as above


(Arun Agarwal) #6

i did the following

  1. shutdown elasticsearch
  2. install plugin
    ./bin/plugin --install elasticsearch/elasticsearch-analysis-icu/2.7.0
    and still end up with same error when i call analyze
  3. restart elasticsearch
  4. from kopf try to run a analyze

[2016-01-23 10:57:12] {"method":"POST","transformRequest":[null],"transformResponse":[null],"url":"https://host:9200/cd-search-v3/_analyze?analyzer=tokenized","data":"aaa","params":{},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json;charset=utf-8"}}
[2016-01-23 10:57:12] REST API output:
[2016-01-23 10:57:12] {"error":"NoClassDefFoundError[Could not initialize class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig]","status":500}


(David Pilato) #7

May be it was shaded but I doubt it worked.


(David Pilato) #8

Can you post the exact request you sent?

Also could you try with elasticsearch 2.1.1?


(Arun Agarwal) #9

Exact request for what ?
I dont have the code pulled down for 2.1.1, its gonna take a while to get to 2.1.1. Right now we have to work with 1.7.1


(David Pilato) #10

I'd like to see the request which corresponds to:

from kopf try to run a analyze

And I'm not saying that you must upgrade. I'm just asking if you could try on a dev laptop the same with 2.1. It would help.


(Arun Agarwal) #11

I got the issue, i had lucene-analyzer-icu in two places, which caused the jvm to go haywire when loading the class

Thanks for the help.


(system) #12