Error: [parsing_exception] [constant_score] query does not support [query]

client.search({
    index: ['index1','index2'],
    body: {
        from: 0, size: 20,
        query: {
            "constant_score": {
                boost: 1.0,
                "query": {
                    query_string: {
                        query: str,
                        fields: ['field_1']
                    }
                }
            }
        }
    },
});
1 Like

We are upgrading from Elasticsearch 5.6.x -> 6.6.1 and we are having the same issue as you are.

Would appreciate it if anyone chimed in.

I found an answer here: https://stackoverflow.com/a/54711928/11130125. Looks promising.

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