[ https://issues.apache.org/jira/browse/LUCENE-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406877#comment-13406877 ]
Gilad Barkai commented on LUCENE-4190: -------------------------------------- Perhaps out of context, but here goes.. Users sometimes do stupid things, me included, such as putting the index in a non-dedicated-directory. But should they pay the penalty just because the code should not get overly complicated? Codecs create their own files, and no one seems able to control what files they create (other than in assert?); Than, is it possible for the codec to handle the removal of the files it created? That would make codecs work the same way the Index handles the 'core' index files - each codec will be able to erase its own. Another closely related option - let IW consult with the codecs about 'non-core-files' and see which one should/could be removed. I only suggest this because I fear for users' files which might get erased. Disclosure: It'll be ages before I understand Lucene 4 half as much as I do Lucene 3.6 (not that that's much), so forgive me if I stepped on anyone's toes, or just described how to implement a time machine :) > IndexWriter deletes non-Lucene files > ------------------------------------ > > Key: LUCENE-4190 > URL: https://issues.apache.org/jira/browse/LUCENE-4190 > Project: Lucene - Java > Issue Type: Bug > Reporter: Michael McCandless > Assignee: Robert Muir > Fix For: 4.0, 5.0 > > Attachments: LUCENE-4190.patch, LUCENE-4190.patch > > > Carl Austin raised a good issue in a comment on my Lucene 4.0.0 alpha blog > post: > http://blog.mikemccandless.com/2012/07/lucene-400-alpha-at-long-last.html > IndexWriter will now (as of 4.0) delete all foreign files from the index > directory. We made this change because Codecs are free to write to any files > now, so the space of filenames is hard to "bound". > But if the user accidentally uses the wrong directory (eg c:/) then we will > in fact delete important stuff. > I think we can at least use some simple criteria (must start with _, maybe > must fit certain pattern eg _<base36>(_X).Y), so we are much less likely to > delete a non-Lucene file.... -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org