我正在使用CouchDB的河流插件,当我执行以下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插件时设置索引的默认设置?
答案 0 :(得分:3)
要解决此问题:
我在这里找到了答案:
答案 1 :(得分:1)
您可以尝试此网址http://localhost:9200/blog/_mapping?pretty=true
在响应映射中,如果未明确提及分析器,则它是默认分析器。