gpt4 book ai didi

search - 使用River插件时如何创建初始Elasticsearch设置

转载 作者:行者123 更新时间:2023-12-02 22:47:27 25 4
gpt4 key购买 nike

我正在为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插件时如何设置索引的默认设置?

最佳答案

要解决此问题:

  • 创建新的Elasticsearch索引+映射等。
  • 创建新的Elasticsearch river,其索引名称设置为在第一步中创建的索引的名称。

  • 我在这里找到了答案:

    http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/5ebf1556d139d5ac/f17e71e04cac5889?lnk=gst&q=couchDB+river+settings#f17e71e04cac5889

    关于search - 使用River插件时如何创建初始Elasticsearch设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7924858/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com