What is the difference between must and filter in Query DSL in elasticsearch?
问题 I am new to elastic search and I am confused between must and filter. I want to perform an and operation between my terms, so I did this POST /xyz/_search { "query": { "bool": { "must": [ { "term": { "city": "city1" } }, { "term": { "saleType": "sale_type1" } } ] } } } which gave me the required results matching both the terms, and on using filter like this POST /xyz/_search { "query": { "bool": { "must": [ { "term": { "city": "city1" } } ], "filter": { "term": { "saleType": "sale_type1" } }