[
https://issues.apache.org/jira/browse/LUCENE-7703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrien Grand updated LUCENE-7703:
---------------------------------
Attachment: LUCENE-7703.patch
Thanks Mike for confirming it would be useful. So I gave it a try, see the
attached patch. It should be fine for regular usage of IndexWriter with calls
to add/updateDocument. However it is not totally clear to me how we should deal
with addIndexes. For the one that takes a list of codec readers, I don't think
there is much we can do anyway since the version is not exposed (and it would
not make much sense anyway?). For the one that takes a list of directories, we
could either reject the call if versions differ (this is what the patch is
doing), or be lenient but this has the major drawback that any assumptions we
might make based on the created version could break. Any opinions?
> Record the version that was used at index creation time
> -------------------------------------------------------
>
> Key: LUCENE-7703
> URL: https://issues.apache.org/jira/browse/LUCENE-7703
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-7703.patch
>
>
> SegmentInfos already records the version that was used to write a commit and
> the version that was used to write the oldest segment in the index. In
> addition to those, I think it could be useful to record the Lucene version
> that was used to create the index. I think it could help with:
> - Debugging: there are things that change based on Lucene versions, for
> instance we will reject broken offsets in term vectors as of 7.0. Knowing the
> version that was used to create the index can be very useful to know what
> assumptions we can make about an index.
> - Backward compatibility. The codec API helped simplify backward
> compatibility of the index files a lot. However for everything that is done
> on top of the codec API like analysis or the computation of length norm
> factors, backward compatibility needs to be handled on top of Lucene. Maybe
> we could simplify this?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]