Must or filter in bool query when size = 0

(Maxim Valyanskiy) #1

I want to run analytics query that has only few filters, and I do not need hits / scoring (size=0). I used filteredQuery in Elasticsearch 1.x. I'm replacing filteredQuery with bool query; should I put my filters in "filter" or in "must" clause? Is there any performance difference? What it the preferred way?

(system) #2