I'm trying to use the multi_match
functionality within Elasticsearch using the elasticsearch-py library.
Setting it up like this:
res = helpers.scan(es, index="allcomms", query = {
"multi_match" : {
"query": 'multiple terms',
"fields": ["text"]
}})
I get:
RequestError: RequestError(400, 'parsing_exception', 'Unknown key for a START_OBJECT in [multi_match].')
Anyone know if there is a way to conduct this search using the Elasticsearch-py library?
Thanks!
I think the query is not correct. Whenever we observe the
parsing_exception
then we need to first ensure that the query we have works viaKibana
orPostman
or any otherRESTful client application
pointing to the ES instance.Your code has to be in the below format.
Basically below is how your multi-match query would be
Let me know if it helps!