【发布时间】:2019-10-15 20:42:32
【问题描述】:
我有以下请求 JSON 用于 ES 查询。它给了我以下错误:
[ImageURL] 查询格式错误,查询名称后没有 start_object
当我在bool 下添加must_not 时。如果我删除must_not,它工作正常。我想获取“ImageURL”不为空的记录
我哪里做错了?请帮忙
{
"from": 0,
"size": 45,
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": [
[{
"term": {
"PostStatusInd": 1
}
}, {
"term": {
"PostCountry": "PAK"
}
}], {
"range": {
"RecModDate": {
"gte": "2019-07-07 00:00:00"
}
}
}, {
"range": {
"PostPriceAmt": {
"gte": "0",
"lte": "100000000"
}
}
}, {
"geo_distance": {
"distance": "41000km",
"Location": {
"lat": "33.6895939",
"lon": "73.0435789"
}
}
}
],
"must_not": {
"ImageURL": null
}
}
},
"sort": [{
"RecModDate": {
"order": "desc"
}
}]
}
【问题讨论】:
标签: elasticsearch