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

Beef up Terms#intersect checks in CheckIndex. #12926

Merged
merged 3 commits into from Dec 19, 2023

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Dec 12, 2023

Now also testing what happens with a non-null startTerm. This found bugs in DirectPostingsFormat.

Now also testing what happens with a non-null `startTerm`. This found bugs in
`DirectPostingsFormat`.
@jpountz jpountz changed the title Beep up Terms#intersect checks in CheckIndex. Beef up Terms#intersect checks in CheckIndex. Dec 12, 2023
@mikemccand
Copy link
Member

This found bugs in DirectPostingsFormat

Whoa, awesome!

Copy link
Member

@mikemccand mikemccand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! I wonder what flies this new spider web / fangs will catch...

@@ -1119,12 +1122,14 @@ public DirectIntersectTermsEnum(CompiledAutomaton compiled, BytesRef startTerm)
}
}

final int termOffset = termOffsets[termOrd];
final int termLen = termOffsets[1 + termOrd] - termOffset;
if (termOrd >= 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!!

@jpountz jpountz merged commit bf45ab7 into apache:main Dec 19, 2023
4 checks passed
@jpountz jpountz deleted the beef_up_check_index_intersect branch December 19, 2023 10:17
jpountz added a commit that referenced this pull request Dec 19, 2023
Now also testing what happens with a non-null `startTerm`. This found bugs in
`DirectPostingsFormat`.
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