elasticsearchのバージョン1.5.1
Elasticsearchでインデックス作成時に以下のようなエラーが出ます
$ curl -XPOST localhost:9200/new_index -d @settings.json
エラー
nested: IndexCreationException[[new_index] failed to create index]; nested: FailedToResolveConfigException[Failed to resolve config path [products_synonyms.txt], tried file path [products_synonyms.txt], path file [/etc/elasticsearch/products_synonyms.txt], and classpath
settings.json
"settings": { "analysis": { "analyzer": { "products_analyzer" : { "type" : "custom", "tokenizer" : "kuromoji_products_dict", "filter" : ["products_synonym", "lowercase"] } }, "tokenizer" : { "kuromoji_products_dict" : { "type" : "kuromoji_tokenizer", "mode" : "search", "discard_punctuation" : "true" } }, "filter" : { "products_synonym" : { "type" : "synonym", "synonyms_path" : "products_synonyms.txt" } } } }
synonyms_pathがまちがっているっぽいのですが、pathはどこに設定すればいいのでしょうか??またsynonymを定義したファイルはどこに置けばいいのでしょうか??
ちなみにこのエラーのときにsynonymを定義したファイルは/etc/elasticsearch/products_synonyms.txt
に置いてます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。