gpt4 book ai didi

Elasticsearch 5 : Unknown key for a START_OBJECT in [filters]

转载 作者:行者123 更新时间:2023-11-29 02:43:49 41 4
gpt4 key购买 nike

我试图从 elasticsearch 1.7 迁移到 5.1,但我遇到了问题:

curl -XGET http://127.0.0.1:9200/openlist_ru-formulars/formular/_search?pretty=true -d '{
"filter": [
{ "range": { "born": { "gte": "1874" }}}
]
}'

并回答:

{
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "Unknown key for a START_OBJECT in [filters].",
"line" : 2,
"col" : 12
}
],
"type" : "parsing_exception",
"reason" : "Unknown key for a START_OBJECT in [filters].",
"line" : 2,
"col" : 12
},
"status" : 400
}

我整天都在使用谷歌,但仍然不知道它是什么意思。请帮忙。

最佳答案

看起来 5.1 版本中的 DSL 结构发生了变化,这个查询很好:

{
"query": {
"bool": {
"filter": [{
"range": {
"born": {
"gte": "1874"
}
}
}]
}
}
}

关于 Elasticsearch 5 : Unknown key for a START_OBJECT in [filters],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40996266/

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