Add missing Lucene99 codec and relax term vectors constraint whem merging#20
Open
david-sitsky wants to merge 2 commits intohakanai:mainfrom
Open
Conversation
added 2 commits
February 10, 2026 15:13
Lucene 8 sets "term vectors" to false even if a field was declared to use "term vectors", but it emitted no terms in the entire segment. Lucene 9 seems to rely on the declared field. Disabling this check to avoid these headaches.
david-sitsky
commented
Feb 12, 2026
| // even if a field was declared to use "term vectors", but it emitted no terms in the entire segment. | ||
| // Lucene 9 seems to rely on the declared field. Disabling this check to avoid these headaches. | ||
| this.strictlyConsistent = false; | ||
| // this.strictlyConsistent = indexCreatedVersionMajor >= 9; |
Author
There was a problem hiding this comment.
This change may not be safe after all.. but the other changes are worth putting in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems in Lucene 8.x and earlier, a field with "term vectors" enabled but with no actual terms emitted, will set "term vectors" to false for that field, but in Lucene 9 it respects the field definition regardless of terms emitted. I relaxed the strictness check introduced in Lucene 9 otherwise some migrations may fail for an index which has multiple segments created in different versions.