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

[PATCH] new method expungeDeleted() added to IndexWriter

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.4
    • core/index
    • None
    • Operating System: Windows XP
      Platform: All

    • 32712

    Description

      We make use the docIDs in lucene. I need a way to compact the docIDs in segments
      to remove the "holes" created from doing deletes. The only way to do this is by
      calling IndexWriter.optimize(). This is a very heavy call, for the cases where
      the index is large but with very small number of deleted docs, calling optimize
      is not practical.

      I need a new method: expungeDeleted(), which finds all the segments that have
      delete documents and merge only those segments.

      I have implemented this method and have discussed with Otis about submitting a
      patch. I don't see where I can attached the patch. I will do according to the
      patch guidleine and email the lucene mailing list.

      Thanks

      -John

      I don't see a place where I can

      Attachments

        1. LUCENE-325.patch
          14 kB
          Michael McCandless
        2. ASF.LICENSE.NOT.GRANTED--IndexWriter.patch
          3 kB
          John Wang
        3. ASF.LICENSE.NOT.GRANTED--TestExpungeDeleted.java
          3 kB
          John Wang
        4. ASF.LICENSE.NOT.GRANTED--attachment.txt
          2 kB
          John Wang
        5. ASF.LICENSE.NOT.GRANTED--IndexWriter.patch
          112 kB
          John Wang

        Activity

          People

            mikemccand Michael McCandless
            john.wang@gmail.com John Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment