Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4190

IndexWriter deletes non-Lucene files

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-BETA, 6.0
    • None
    • None
    • New

    Description

      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....

      Attachments

        1. LUCENE-4190.patch
          5 kB
          Robert Muir
        2. LUCENE-4190.patch
          5 kB
          Robert Muir
        3. LUCENE-4190.patch
          5 kB
          Robert Muir
        4. LUCENE-4190.patch
          12 kB
          Robert Muir

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: