KeitaSuzuki score 15
2016/05/16 14:19 投稿
Elasticsearchのsynonyms_pathを設定できなくて困ってます |
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" : "analysis/products_synonyms.txt" |
"synonyms_path" : "products_synonyms.txt" |
} |
} |
} |
} |
``` |
--- |
synonyms_pathがまちがっているっぽいのですが、pathはどこに設定すればいいのでしょうか??またsynonymを定義したファイルはどこに置けばいいのでしょうか?? |
ちなみにこのエラーのときにsynonymを定義したファイルは`/etc/elasticsearch/analysis/products_synonyms.txt`に置いてます。 |
ちなみにこのエラーのときにsynonymを定義したファイルは`/etc/elasticsearch/products_synonyms.txt`に置いてます。 |
KeitaSuzuki score 15
2016/05/16 10:26 投稿
FailedToResolveConfigException Failed to resolve config path |
Elasticsearchのsynonyms_pathを設定できなくて困ってます |
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" : "analysis/products_synonyms.txt" |
} |
} |
} |
} |
``` |
--- |
synonyms_pathがまちがっているっぽいのですが、pathはどこに設定すればいいのでしょうか??またsynonymを定義したファイルはどこに置けばいいのでしょうか?? |
ちなみにこのエラーのときにsynonymを定義したファイルは`/etc/elasticsearch/analysis/products_synonyms.txt`に置いてます。 |