[
https://issues.apache.org/jira/browse/LUCENE-7756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950843#comment-15950843
]
Adrien Grand commented on LUCENE-7756:
--------------------------------------
bq. I'm a little confused by the testing hack for SegmentInfos: won't pre-7.0
indices "legitimately" have a null minVersion, and so Lucene needs to handle
that "gracefully"? For such old indexes, does/shouldn't
SegmentInfo.getMinVersion() return null? And if those old segments get merged
even with new segments, it should still return null?
Absolutely. We expect all indices created on or after 7.0 to set the
minVersion. However for testing old codecs, we create new indices
(createdVersion = 7) with old codec components that do not support recording
the minVersion, such as {{Lucene62RWSegmentInfoFormat}}. Without the hack, all
tests that use a codec whose {{SegmentInforFormat}} is not
{{Lucene70SegmentInfoFormat}} or {{SimpleTextSegmentInfoFormat}} would fail.
This is a bit of a Frankenstein situation, but those tests for old codecs
components like {{TestLucene62SegmentInfoFormat}} have value in my opinion so I
did not want to remove them. There are only 3 tests that make use of this hack:
{{TestLucene50SegmentInfoFormat}}, {{TestLucene62SegmentInfoFormat}} and
{{TestLucene62SegmentInfoFormat}}.
I like your other suggestions, I'll apply them!
> Only record the major that was used to create the index rather than the full
> version
> ------------------------------------------------------------------------------------
>
> Key: LUCENE-7756
> URL: https://issues.apache.org/jira/browse/LUCENE-7756
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-7756.patch, LUCENE-7756.patch
>
>
> LUCENE-7703 added information about the Lucene version that was used to
> create the index to the segment infos. But since there is a single creation
> version, it means we need to reject calls to addIndexes that can mix indices
> that have different creation versions, which might be seen as an important
> regression by some users. So I have been thinking about only recording the
> major version that was used to create the index, which is still very valuable
> information and would allow us to accept calls to addIndexes when all merged
> indices have the same major version. This looks like a better trade-off to me.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]