[
https://issues.apache.org/jira/browse/LUCENE-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13571596#comment-13571596
]
Michael McCandless commented on LUCENE-4754:
--------------------------------------------
Thanks i30817, I see what's happening: IndexWriter created a new (empty)
SegmentInfos in memory, but it also goes and loads any prior commit points in
the index and then gives IndexDeletionPolicy a chance (onInit) to delete them.
The problem is, it cannot load those prior commit points since they are too old
...
So realistically I don't think we can fix this, ie the app/user must fully
delete the ancient index even with OpenNode.CREATE.
But thanks for raising this!
> IndexWriter can't handle old lucene inex format when opened with create mode
> ----------------------------------------------------------------------------
>
> Key: LUCENE-4754
> URL: https://issues.apache.org/jira/browse/LUCENE-4754
> Project: Lucene - Core
> Issue Type: Bug
> Affects Versions: 4.1
> Reporter: i30817
> Priority: Minor
>
> IndexWriter indexWriter = new IndexWriter(cacheDir,
> new IndexWriterConfig(Version.LUCENE_41, englishAnalyzer).
> setOpenMode(IndexWriterConfig.OpenMode.CREATE));
> Fails with CorruptedIndex subclass, IndexTooOldException (or something like
> that), even though the config would just replace the files.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]