Skip to content

Port fix for Token's positionLength from Lucene 4.8.1, #1381 - #1421

Merged
paulirwin merged 1 commit into
apache:masterfrom
paulirwin:issue/1381-batch-3
Aug 30, 2026
Merged

paulirwin merged 1 commit into
apache:masterfrom
paulirwin:issue/1381-batch-3

Conversation

@paulirwin

Copy link
Copy Markdown
Contributor
  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Backport fix for Token's positionLength from Lucene 4.8.1

Partial #1381 (Batch 3)

Description

This backports commit c921f8a009c for LUCENE-5639 from the 4.8.1 release. This fixes usage of Token's positionLength value.

@paulirwin
paulirwin requested a review from NightOwl888 July 12, 2026 03:24
@paulirwin paulirwin added the notes:bug-fix Contains a fix for a bug label Jul 12, 2026
@paulirwin paulirwin mentioned this pull request Jul 12, 2026
18 of 19 tasks
@paulirwin paulirwin changed the title Backport fix for Token's positionLength from Lucene 4.8.1, #1381 Port fix for Token's positionLength from Lucene 4.8.1, #1381 Jul 16, 2026

@NightOwl888 NightOwl888 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like a faithful port of the upstream commit.

I did not check what all of the implications of adding this commit will be, but did ask ChatGPT whether changing GetHashCode() and Equals() will affect binary compatibility of the index and the answer was generally no. But we should probably merge #1351 and rebase this against it to be sure.

@paulirwin
paulirwin merged commit bd3b3be into apache:master Aug 30, 2026
211 checks passed
@paulirwin

Copy link
Copy Markdown
Contributor Author

But we should probably merge #1351 and rebase this against it to be sure.

Since #1351 had some significant feedback that I addressed, I didn't want to dismiss your review... instead I merged this one and rebased #1351, and the tests still pass, which accomplishes the same concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:bug-fix Contains a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants