我有以下查询,我想"Schwarz"
在名称字段或消息字段中获取搜索词。语言必须是奥地利语,状态类型应与提供的列表相同。我收到以下异常,但我不知道为什么:
QueryParsingException[[my_test_index] [_na] 查询格式错误,start_object 后没有字段]; }]",
{
"query": {
"filtered": {
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"name": "Schwarz"
}
},
{
"term": {
"message": "Schwarz"
}
}
],
"minimum_should_match": 1
}
},
{
"terms": {
"status_type": [
"1",
"2",
"3",
"4",
"5",
"6",
"7"
]
}
},
{
"term": {
"language": "Austrian"
}
}
]
}
}
}
},
"sort": [
{
"total": {
"order": "desc"
}
}
]
}
这是没有过滤器的查询仍然有效:
{
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"match": {
"standard_analyzed_name": "Schwarz"
}
},
{
"match": {
"standard_analyzed_message": "Schwarz"
}
}
],
"must": [
{
"terms": {
"buzzsumo_status_type": [
"1",
"2",
"3",
"4",
"5",
"6",
"7"
]
}
},
{
"term": {
"language": "Austrian"
}
}
]
}
}
}
},
"sort": [
{
"total_interactions": {
"order": "desc"
}
}
]
}