Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,12 @@ static final class FieldNumbers {
this.omitNorms = new HashMap<>();
this.storeTermVectors = new HashMap<>();
this.softDeletesFieldName = softDeletesFieldName;
this.strictlyConsistent = indexCreatedVersionMajor >= 9;

// Don't perform "strictly consistent" checking as Lucene 8/9 semantics differ. 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.
this.strictlyConsistent = false;
// this.strictlyConsistent = indexCreatedVersionMajor >= 9;
Copy link
Author

Choose a reason for hiding this comment

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

This change may not be safe after all.. but the other changes are worth putting in.

Copy link
Owner

Choose a reason for hiding this comment

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

It seems like Lucene themselves may have done something similar?

https://github.com/apache/lucene/pull/842/changes

Maybe the thing to do is update the baked Lucene to 9.2+... but yeah, having more codecs in the list makes sense independently, maybe split the PR?

this.parentFieldName = parentFieldName;
if (softDeletesFieldName != null
&& parentFieldName != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

org.trypticon.luceneupgrader.lucene9.internal.lucene.codecs.lucene912.Lucene912Codec

org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene99.Lucene99Codec
org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene95.Lucene95Codec
org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene80.Lucene80Codec
org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene84.Lucene84Codec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

org.trypticon.luceneupgrader.lucene9.internal.lucene.codecs.lucene912.Lucene912PostingsFormat

org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene99.Lucene99PostingsFormat
org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene90.Lucene90PostingsFormat
org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene84.Lucene84PostingsFormat
org.trypticon.luceneupgrader.lucene9.internal.lucene.backward_codecs.lucene50.Lucene50PostingsFormat
Loading