Do not throw errors on unknown types in SearchAfterBuilder#48147
Merged
jimczi merged 4 commits intoelastic:masterfrom Oct 23, 2019
Merged
Do not throw errors on unknown types in SearchAfterBuilder#48147jimczi merged 4 commits intoelastic:masterfrom
jimczi merged 4 commits intoelastic:masterfrom
Conversation
The support for BigInteger and BigDecimal was added for XContent in elastic#32888. However the SearchAfterBuilder xcontent parser doesn't expect them to be present so it throws an AssertionError. This change fixes this discrepancy by changing the AssertionError into an IllegalArgumentException that will not cause the node to die when thrown. Closes elastic#48074
Collaborator
|
Pinging @elastic/es-search (:Search/Search) |
jtibshirani
approved these changes
Oct 18, 2019
Contributor
jtibshirani
left a comment
There was a problem hiding this comment.
Looks good to me, just left a suggestion around the error message.
server/src/main/java/org/elasticsearch/search/searchafter/SearchAfterBuilder.java
Outdated
Show resolved
Hide resolved
jimczi
added a commit
that referenced
this pull request
Oct 23, 2019
* Do not throw errors on unknown types in SearchAfterBuilder The support for BigInteger and BigDecimal was added for XContent in #32888. However the SearchAfterBuilder xcontent parser doesn't expect them to be present so it throws an AssertionError. This change fixes this discrepancy by changing the AssertionError into an IllegalArgumentException that will not cause the node to die when thrown. Closes #48074
jimczi
added a commit
that referenced
this pull request
Oct 23, 2019
* Do not throw errors on unknown types in SearchAfterBuilder The support for BigInteger and BigDecimal was added for XContent in #32888. However the SearchAfterBuilder xcontent parser doesn't expect them to be present so it throws an AssertionError. This change fixes this discrepancy by changing the AssertionError into an IllegalArgumentException that will not cause the node to die when thrown. Closes #48074
This was referenced Feb 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The support for BigInteger and BigDecimal was added for XContent in
#32888. However the SearchAfterBuilder
xcontent parser doesn't expect them to be present so it throws an AssertionError.
This change fixes this discrepancy by changing the AssertionError into an
IllegalArgumentException that will not cause the node to die when thrown.
Closes #48074