它在7.6.2上运行,但自从升级到7.7后就停止工作了,不知道为什么?
我正在用嵌套的或嵌套的must进行查询,所以在三列上必须是5或6。
我正在使用laravel scout驱动程序进行ElasticSearchbabenkoivan/scout elasticsearch驱动程序
谢谢:)!
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"bool": {
"must": [
[
{
"term": {
"section": "205"
}
},
{
"term": {
"profile": "40"
}
},
{
"term": {
"rim_size": "17"
}
}
]
]
}
}
]
}
},
{
"bool": {
"should": [
[
{
"term": {
"supplier_id": 3
}
}
]
]
}
}
]
}
},
错误:
{
"error":{
"root_cause":[
{
"type":"x_content_parse_exception",
"reason":"[1:106] [bool] failed to parse field [must]"
}
],
"type":"x_content_parse_exception",
"reason":"[1:106] [bool] failed to parse field [must]",
"caused_by":{
"type":"x_content_parse_exception",
"reason":"[1:106] [bool] failed to parse field [should]",
"caused_by":{
"type":"x_content_parse_exception",
"reason":"[1:106] [bool] failed to parse field [must]",
"caused_by":{
"type":"illegal_state_exception",
"reason":"expected value but got [START_ARRAY]"
}
}
}
},
"status":400
}
1条答案
按热度按时间rggaifut1#
您的数据库中有两个嵌套数组
bool/must
,您需要删除一个:它应该是这样的: