After upgrading elasticsearch to 7.7 there is problem with parsing must_not query:
{"error":{"root_cause":[{"type":"parsing_exception","reason":"Failed to parse","line":1,"col":104}],"type":"parsing_exception","reason":"Failed to parse","line":1,"col":104,"caused_by":{"type":"x_content_parse_exception","reason":"[1:104] [bool] failed to parse field [must_not]","caused_by":{"type":"illegal_state_exception","reason":"expected value but got [START_ARRAY]"}}},"status":400}
Syntax accepted prior to version 7.7:
{
"from": 0,
"size": 20,
"track_total_hits": true,
"query": {
"bool": {
"must_not": [
[
{
"term": {
"fo_system": "3"
}
}
]
],
}
}
}
And now the must_not part must be changed to:
"must_not": [
{
"term": {
"fo_system": "3"
}
}
]
Is it correct behaviour or just a bug?