(Plugin Kuromoji) Can you help me resolve config elasticsearch.yml create analyzer?


(Ngọc Phạm) #1

Sorry for my newbie question ,My Japanese not good and i will start by English
i have one issue in elasticsearch 1.7.3

i want creat new analyzer use this https://github.com/elastic/elasticsearch-analysis-kuromoji
after install plugin kuromoji,
i tried config in elasticsearch.yml

index.analysis.analyzer.default.type: kuromoji
index.analysis.analyzer.default.tokenizer: kuromoji_tokenizer
index.analysis.analyzer.default.filter: ["romaji_readingform"]
index.analysis.analyzer.default.filter.romaji_readingform:["use_romaji : true"]

but if i tried input like example "TokenFilter : kuromoji_readingform" with input "寿司" , it not show what plugin will show is "スシ" and "sushi". In my opnion, i wrong config, but i search more in google and i still dont know how to fix it.
My Japanese not good , can you explain by English please ?
Please help me fix elasticsearch.yml :smile:
Thanks you very much !


(Jun Ohtani) #2

Hi,

If you want to use default analyzer with Kuromoji, the following setting works.

index.analysis.analyzer.default.type: custom
index.analysis.analyzer.default.tokenizer: kuromoji_tokenizer
index.analysis.analyzer.default.filter: ["romaji_readingform"]
index.analysis.filter.romaji_readingform.type: "kuromoji_readingform"
index.analysis.filter.romaji_readingform.use_romaji: "true"

I'm not sure what you want.
This settings output only "sushi".
romaji_readingform filter can output only Romaji OR Kana.


(Ngọc Phạm) #3

thanks you for your help.
I want create one analyzer use plugin kuromoji analyzer like katakana_analyzer or romaji_analyzer config in elasticsearch.yml
can you have any way??
Example katakana_analyzer can change 寿司 -> スシ

I cant config it . :slight_smile: It all i need

Thanks you


(Jun Ohtani) #4

Hi,

I think you should not use elasticsearch.yml.
You should use index template or index mapping.
https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-kuromoji-readingform.html


(Ngọc Phạm) #5

thanks :smile:
I used index mapping and i create sucess 2 analyzer

Hmm , but im curious about config with elasticsearch.yml . We cant create analyzer in this ?
In google search and i found some file config analyzer in elasticsearch.yml, but it always error with me.

Again, thanks for your help :smile:
Have anyway create analyzer in elasticsearch.yml ??


(system) #6