0
我有一個名稱列和category_id列的表。以下查詢返回BadRequest
錯誤。我認爲這是從錯誤blob返回的最有意義的。帶或不帶關鍵字的過濾器查詢
*備註:"something*"
是我通過搜索的關鍵字。
Expected field name but got START_OBJECT
我要尋找的查詢將返回category_id
使用或不使用關鍵字搜索過濾的結果。
{
query: {
bool: {must: [{
wildcard: {name: "something*"}
]},
filtered: {
filter: {
bool: {
must: {
term: {category_id: 1}
}
}
}
}
},
sort: [{
_geo_distance: {
store_location: {:lat=>0, :lon=>0},
order: "asc",
unit: "miles"
}
}]
}
這個查詢有什麼問題?
mysql?不這麼認爲。 –