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
Clean up AnyQueryNode code #13053
Clean up AnyQueryNode code #13053
Conversation
- removed redundant field initializers - fixed a typo in the field name: `minimumMatching_m_Elements` - removed redundant `instanceof` checks - replaced type casts with a pattern variable - changed `size() == 0` to `isEmpty()` - removed unnecessary explicit `toString()` calls
Thank you, LGTM. Could you add a changes entry as well? |
if (clause instanceof FieldableNode) { | ||
((FieldableNode) clause).setField(field); | ||
} | ||
if (clause instanceof FieldQueryNode qn) { |
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.
This won't backport to 9x, unfortunately. I'll just correct it manually when backporting. Or should we leave this on main only, @uschindler - wdyt?
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.
I could undo the pattern variable part, leaving it to #12295.
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.
Yes please.
# Conflicts: # lucene/CHANGES.txt
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 fine. Thanks for also fixing the typo in field name. 🤩
minimumMatching_m_Elements
instanceof
checkssize() == 0
toisEmpty()
toString()
calls