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?不这么认为。 –