Queries, filters and match_all

Guys, I still need help, A've tried to change filtered query strategies. It
returns all the filtered results anyway for versions 1.0.0 - 1.2.1. When
this behavior was changed and how? Why don't I need match_all for filtered
query with empty query?

пятница, 6 июня 2014 г., 7:14:28 UTC+7 пользователь Arkadiy Zabazhanov
написал:

Yeah, I've got ehis already, thanks.

I'm still confused why filtered query is returning all results even
without match_all in filtered query.

четверг, 5 июня 2014 г., 6:21:03 UTC+7 пользователь Ivan Brusic написал:

There is no label, but the change was made last December:

Renamed top level `filter` to `post_filter`. by martijnvg · Pull Request #4461 · elastic/elasticsearch · GitHub

It appears that the REST API still supports the old notation, but the
change did break Java backwards compatibility

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/query/QueryPhase.java#L71

--
Ivan

On Tue, Jun 3, 2014 at 8:11 PM, Arkadiy Zabazhanov kinw...@gmail.com
wrote:

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 (
Elasticsearch Platform — Find real-time answers at scale | Elastic) 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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/c8bddc46-7347-4ca9-a9ea-65100a017673%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/c8bddc46-7347-4ca9-a9ea-65100a017673%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/811a5138-21d1-4ad0-a051-510a7494be65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.