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

Proposal to fix #3079 (span_near query should accept slop = -1) #3122

Closed
wants to merge 2 commits into from
Closed

Proposal to fix #3079 (span_near query should accept slop = -1) #3122

wants to merge 2 commits into from

Conversation

iksnalybok
Copy link
Contributor

This pull request changes the default slop value from -1 to Integer.MIN_VALUE (in SpanNearQueryParser.java).

The bug remains (i.e. you can specify slop = -2147483648, and the SpanNearQueryParser will raise error "span_near must include [slop]"), but unlike -1, I'm not aware of any case where such a slop value is useful.

@s1monw
Copy link
Contributor

s1monw commented May 30, 2013

can we just make it an Integer and initialise it with null and check for null to raise the exception?

@iksnalybok
Copy link
Contributor Author

Updated to use null check as suggested.

@s1monw
Copy link
Contributor

s1monw commented May 31, 2013

merged, thanks

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.

None yet

2 participants