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

Deprecate TermInSetQuery#getTermData #12173

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

gsmiller
Copy link
Contributor

Description

TermInSetQuery#getTermData is effectively leaking our internal encoding of the query terms, which will prevent us from changing this in the future if we want to. Nothing in our code relies on this right now, and I think we ought to remove it. If users really need to get the terms, they can keep track of them (they provide them in the first place) in whatever encoding they like. If there's really a need to go beyond this, we could expose some sort of Iterator<BytesRef> method. But let's stop exposing the PrefixCodedTerms instance directly.

Note: I will remove the method completely on main but mark deprecated on 9x as this PR demonstrates.

@gsmiller gsmiller merged commit c8741f7 into apache:main Mar 1, 2023
@gsmiller gsmiller deleted the GH/tis-deprecate-getterms branch March 1, 2023 13:42
gsmiller added a commit that referenced this pull request Mar 1, 2023
@gsmiller gsmiller added this to the 9.6.0 milestone Mar 1, 2023
cbuescher added a commit to cbuescher/lucene that referenced this pull request Sep 18, 2024
Addresses apache#13778

TermInSetQuery used to have an accessor to its terms that was removed in apache#12173
to protect leaking internal encoding details. This introduces an accessor to the
term data in the query that doesn't expose internal but merely allows iterating
over the decoded BytesRef, making inspection of the querys content possible again.
cbuescher added a commit to cbuescher/lucene that referenced this pull request Sep 18, 2024
Addresses apache#13804

TermInSetQuery used to have an accessor to its terms that was removed in apache#12173
to protect leaking internal encoding details. This introduces an accessor to the
term data in the query that doesn't expose internal but merely allows iterating
over the decoded BytesRef, making inspection of the querys content possible again.
javanna pushed a commit that referenced this pull request Sep 19, 2024
TermInSetQuery used to have an accessor to its terms that was removed in #12173
to protect leaking internal encoding details. This introduces an accessor to the
term data in the query that doesn't expose internals but merely allows iterating
over the decoded BytesRef, making inspection of the querys content possible again.

Closes #13804
javanna pushed a commit that referenced this pull request Sep 19, 2024
TermInSetQuery used to have an accessor to its terms that was removed in #12173
to protect leaking internal encoding details. This introduces an accessor to the
term data in the query that doesn't expose internals but merely allows iterating
over the decoded BytesRef, making inspection of the querys content possible again.

Closes #13804
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.

2 participants