Combine bool and fuzzy query

I have ES query. Now I want add to this query 'fuzzy' parameter. I'am trying :

            "body"  : {
        "query" : {
            "bool" : {
                "must" : {
                    $finalQuery,
                    },
                }
            },
            "match" : {
                "city" : {
                    "query" : 'Tokkiio',
                    "fuzziness" : "AUTO"
                },
            }
        }

$finalQuery is query generated in loop, contains terms, range and term parameters.

I am receiving :

"{"error":{"root_cause":[{"type":"parsing_exception","reason":"[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]","line":1,"col":177}],"type":"parsing_exception","reason":"[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]","line":1,"col":177},"status":400}"

Thanks for help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.