私は CouchDB 用の river プラグインを使用しており、次の curl コマンドを実行すると:
curl -XPUT 'localhost:9200/_river/blog/_meta' -d '{
"type": "couchdb",
"couchdb": {
"host": "localhost",
"port": 5984,
"db": "blog",
"filter": null
},
"index": {
"analysis": {
"analyzer": {
"whitespace": {
"type": "whitespace",
"filter": "lowercase"
},
"ox_edgeNGram": {
"type": "custom",
"tokenizer": "ox_t_edgeNGram",
"filter": [
"lowercase"
]
},
"ox_NGram": {
"type": "custom",
"tokenizer": "ox_t_NGram",
"filter": [
"lowercase"
]
}
},
"tokenizer": {
"ox_t_edgeNGram": {
"type": "edgeNGram",
"min_gram": 2,
"max_gram": 25,
"side": "front"
},
"ox_t_NGram": {
"type": "NGram",
"min_gram": 2,
"max_gram": 25
}
}
}
}
}'
応答を受け取ります:
{
"ok": true,
"_index": "_river",
"_type": "blog",
"_id": "_meta",
"_version": 1
}
私が抱えている問題は、ブラウザで設定を表示して次の場所に移動する場合です。
http://localhost:9200/blog/_settings?pretty=true
返ってくるjsonは以下の通りですが、自分が作成したと思っていたアナライザーなどの情報を期待しています。
返された JSON:
{
"blog": {
"settings": {
"index.number_of_shards": "5",
"index.number_of_replicas": "1"
}
}
}
また、リバーを使用せずにブログのインデックスを作成し、curl コマンドを実行して分析情報を入力すると、入力した設定を示すブラウザーからの応答が返されます。
River プラグインを使用する場合、インデックスのデフォルト設定を設定するにはどうすればよいですか?