Hey,
Filtered queries are using the filter along side query execution (what you
want in most cases).
Top level filters (the "filter" field in your query) are executed after
query execution. This allows you to get back these filtered results in the
"hits" field, but also to have facets operating on the query without the
filter being applied. In practice you have a top level filter for field
'age' between 20 and 25, which means, your "hits" array will only include
these results, but if you are facetting on the age field in the same search
request, the facet calculation will be done without the filter being
applied.
Hope this helps. If not, just ask further question.
--Alex
On Tue, May 14, 2013 at 9:04 AM, David MZ david.mazvovsky@gmail.com wrote:
I am still confused about the difference between using a filter and using
a filtered query
Can shed some light on this pleaseOn Tue, May 14, 2013 at 9:56 AM, Radu Gheorghe <radu.gheorghe@sematext.com
wrote:
On Mon, May 13, 2013 at 2:06 PM, Clinton Gormley clint@traveljury.comwrote:
Radu - re the
andfilter: it won't be better than bool in this case.
It's good for combining non-bitset filters (eg geo filters) but the bool
filter is better for combing bitset filters, like all of the filters listed
in the OP.Thanks, Clint! I didn't know that. And since I wanted to learn more, I
found this very helpful article (note also the references at the bottom):http://euphonious-intuition.com/2013/05/all-about-elasticsearch-filter-bitsets/
Putting the link here in case it helps other people as well
Best regards,
Radu--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/AIURb0tfVHI/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.For more options, visit https://groups.google.com/groups/opt_out.
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.