-
Notifications
You must be signed in to change notification settings - Fork 662
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
SOLR-16360: Atomic update on boolean fields doesn't reflect when value starts with "1", "t" or "T" #1816
Conversation
Can you add a test please? |
On it! |
Are we able to reuse the code from StrUtils for this instead of duplicating? |
Added tests and incorporated Justin's comment. |
… to avoid having to change the latter for atomic update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to use StrUtils.parseBoolean here (makes sense), shouldn't we change toInternal
to use it too?
…to centralize the boolean check
Can you please add an entry to CHANGES.txt under 9.4 (the next release) |
Would it make sense for this to be considered for 8.11.3 release next month ? |
Yes (if you want to back-port), but that shouldn't affect CHANGES.txt for now because that's a special situation. |
This is done. Awaiting review. Thanks. |
# Conflicts: # solr/CHANGES.txt
…e starts with "1", "t" or "T" (#1816) * StrUtils.parseBoolean() can accept a CharSequence --------- Co-authored-by: Rahul Goswami <rgoswami@commvault.com>
https://issues.apache.org/jira/browse/SOLR-16360
Description
Added a change in toNativeType(Object val) method of BoolField.java to check for the first character of val and return true if it is '1', 't' or 'T'
Solution
Added a change in toNativeType(Object val) method of BoolField.java to check for the first character of val and return true if it is '1', 't' or 'T'
Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.