我正在为 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"
}
}
}
还应该注意的是,当我不使用 River 创建博客索引并运行 curl 命令输入分析信息时,我确实会收到来自浏览器的响应,指示我输入的设置。
使用 River 插件时如何设置索引的默认设置?