So I suppose that when I run a filtered query like this one, ES filters all the documents in the database, and then performs the match query only to the documents that fit the filter, right? I just want to make sure that it doesn't perform the match query on all the documents and the drop the ones that don't fit the filter, because that would be a total waste of resources as I'm only interested on a small portion of the documents.
{ "query" : { "filtered" : { "query": { "match": { "field1": "whatever" } }, "filter" : { "term" : { "field2" : 10 } } } } } Thanks for clarifying this! -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ee8f3294-9761-4d7b-b8b1-e49943d88ae7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.