Btw, Answer for the second question is top-level filter was renamed to 
post_filter. That's awesome. So the first question is answered too. 
Filtered query is preferred.
Still waiting for an answer for the third question. Since I didn't find 
filter to post_filter renaming in changelog 
(http://www.elasticsearch.org/downloads/1-0-0/) and I can't find anything 
about new query behavior. I need just version where was it changed, please.

вторник, 3 июня 2014 г., 19:27:17 UTC+7 пользователь Arkadiy Zabazhanov 
написал:
>
> Hello. Help me please, I'm confused. As far as I remember, there was the 
> only way to pass filters to search query - via filtered query. But 
> currently there is a top-level filter part of the query. However, 
> top-level filter affects query only and doesn't affect i.e. facets. But 
> filtered query filter affects both of the query and facets facilities. 
> Also, I remember there was a time I need to add match_all query to 
> filtered query section if query was empty and filters only was present. 
> Otherwise returned empty set of documents. Since I'm trying to create 
> high-level Ruby library could you please answer following questions:
>
> 1) Which way is preferred now and in future: filtered top-level query or 
> top-level filter with top-level query?
> 2) How do you plan to resolve such an API inconsistency when filtered 
> query filter affects outside statements and top-level filter doesn't affect 
> some parts of request?
> 3) Why do I remember about match_all feature and when did requests 
> started to return all the documents with empty query section in filtered 
> query? I'm checking it right now on 1.2.0 and I don't need to use 
> match_all, or constant_score it just returns all the docs for me.
>
> Thanks in advance.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/c8bddc46-7347-4ca9-a9ea-65100a017673%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to