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

SpanNearQueryBuilder should return the inner clause when a single clause is provided #25856

Merged
merged 1 commit into from Jul 24, 2017

Conversation

Projects
None yet
4 participants
@jimczi
Copy link
Member

commented Jul 24, 2017

This change handles the case where a SpanNearQueryBuilder tries to create a query with a single clause.
This is not allowed in the SpanNearQuery so instead of throwing an exception when the weight is built, this change builds and returns
the singleton inner clause on toQuery.

Fixes #25630

SpanNearQueryBuilder should return the inner clause when a single cla…
…use is provided

This change handles the case where a SpanNearQueryBuilder tries to create a query with a single clause.
This is not allowed in the SpanNearQuery so instead of throwing an exception when the weight is built, this change builds and returns
the singleton inner clause on toQuery.

Fixes #25630
@martijnvg
Copy link
Member

left a comment

LGTM

@jimczi jimczi merged commit d73e17c into elastic:master Jul 24, 2017

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci Build finished.
Details

@jimczi jimczi deleted the jimczi:bug/span_near_single_clause branch Jul 24, 2017

jimczi added a commit that referenced this pull request Jul 24, 2017

SpanNearQueryBuilder should return the inner clause when a single cla…
…use is provided (#25856)

This change handles the case where a SpanNearQueryBuilder tries to create a query with a single clause.
This is not allowed in the SpanNearQuery so instead of throwing an exception when the weight is built, this change builds and returns
the singleton inner clause on toQuery.

Fixes #25630

@clintongormley clintongormley added v6.0.0-beta1 and removed v6.0.0 labels Jul 25, 2017

@dipanjanS

This comment has been minimized.

Copy link

commented Aug 8, 2017

Guys, I had ran into this issue recently on 5.3. Is this fix going to be pushed in the next release of ElasticSearch or do I need to use some other version which is already released?

@jimczi

This comment has been minimized.

Copy link
Member Author

commented Aug 8, 2017

@dipanjanS the fix is targeted for the next minor release of 5.x (5.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.