Lucene - Core
  1. Lucene - Core
  2. LUCENE-2259

add IndexWriter.removeUnferencedFiles, so apps can more immediately delete index files when readers are closed

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This has come up several times on the user's list.

      On Windows, which prevents deletion of still-open files, IndexWriter cannot remove files that are in-use by open IndexReaders. This is fine, and IndexWriter periodically retries the delete, but it doesn't retry very often (only on open, on flushing a new segment, and on committing a merge). So it lacks immediacy.

      With this expert method, apps that want faster deletion can call this method.

      1. LUCENE-2259.patch
        5 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Attached patch.

        I named the method deleteUnusedFiles. Also, when an NRT reader is closed, I call that method.

        Show
        Michael McCandless added a comment - Attached patch. I named the method deleteUnusedFiles. Also, when an NRT reader is closed, I call that method.

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development