I have the below query in which I want to get the search term "Schwarz"
either in the name field or the message field. The language must be Austrian and the status type should be equal to the provided list. I'm getting the following exception and I can't figure out why:
QueryParsingException[[my_test_index] [_na] query malformed, no field after 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"
}
}
]
}
Here is the query without the filter that still works:
{
"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"
}
}
]
}