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

[PATCH] don't delete all files in index directory on index creation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      34695

      Description

      Many people use Lucene to index a part of their file system. The chance that
      you some day mix up index directory and document directory isn't that bad.
      Currently Lucene will delete all files in the index directory when the
      create paramater passed to IndexWriter is true, thus deleting your documents
      if you mixed up the parameters. I'll attach a patch that fixes
      this. Any objections?

        Activity

        Hide
        daniel.naber@t-online.de Daniel Naber added a comment -

        Created an attachment (id=14887)
        patch to only delete known files in index directory

        Show
        daniel.naber@t-online.de Daniel Naber added a comment - Created an attachment (id=14887) patch to only delete known files in index directory
        Hide
        daniel.naber@t-online.de Daniel Naber added a comment -

        Patch committed.

        Show
        daniel.naber@t-online.de Daniel Naber added a comment - Patch committed.
        Hide
        daniel.naber@t-online.de Daniel Naber added a comment -

        Created an attachment (id=14944)
        new patch with one place for suffixes

        Show
        daniel.naber@t-online.de Daniel Naber added a comment - Created an attachment (id=14944) new patch with one place for suffixes
        Hide
        cutting@apache.org cutting@apache.org added a comment -

        +1

        This looks great. Thanks.

        Show
        cutting@apache.org cutting@apache.org added a comment - +1 This looks great. Thanks.

          People

          • Assignee:
            daniel.naber@t-online.de Daniel Naber
            Reporter:
            daniel.naber@t-online.de Daniel Naber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development