Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested query in case "bool" with single "must" given #51

Merged
merged 1 commit into from
Dec 24, 2015
Merged

Fix nested query in case "bool" with single "must" given #51

merged 1 commit into from
Dec 24, 2015

Conversation

mvar
Copy link
Member

@mvar mvar commented Dec 21, 2015

Fixes #32

This PR deprecates BoolQuery::isRelevant() because it complicates everything. Too many places uses that complicated logic. Idea is "keep things simple, use single (full) query structure".

After these changes queries with single must bool will look like this:

{"bool":{"must":[{"match_all":[]}]}}

Instead of this:

{"match_all":[]}

Both ways are valid and equal. This does not influence results returned by Elasticsearch.

In the future we could simplify structure again, BUT only if we could do that in BoolQuery itself. That would be a BC break. I think each query class itself should return full array ([type=>data_array]).

Please merge this only after #48 is merged.

@mvar mvar added the qa label Dec 21, 2015
saimaz added a commit that referenced this pull request Dec 24, 2015
Fix nested query in case "bool" with single "must" given
@saimaz saimaz merged commit 738f7a3 into ongr-io:master Dec 24, 2015
@saimaz saimaz removed the qa label Dec 24, 2015
@saimaz
Copy link
Member

saimaz commented Dec 24, 2015

Merged, but IMO we need few more test cases with different queries inside for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants