I am beginner programmer in python. Now I have integrated Elasticseach 6.8.1 version with python and now I have to delete data from elasticsearch using pyhton language. For this I have written following query
query = {'bool':{'must':[
{'term':{'db_id':25}},
{'terms': {'type': ['user_likes','likes']}}
]}}
es_client.delete_by_query(index="user_likes", doc_type='doc', body=query)
When I run this query I get following error
{RequestError}RequestError(400, 'parsing_exception', 'Unknown key for a START_OBJECT in [bool].')
I did not found in example the how I can use must with multiple condition for delete_by_query. how I can execute this query for delete_by_query?
elasticsearch index& what is your expected output. - Sowjanya R Bhat