DocumentsWriter.applyDeletes should not create TermDocs or IndexSearcher if not 
needed
--------------------------------------------------------------------------------------

                 Key: LUCENE-2275
                 URL: https://issues.apache.org/jira/browse/LUCENE-2275
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Index
            Reporter: Shai Erera
             Fix For: 3.1
         Attachments: LUCENE-2275.patch

DocumentsWriter.applyDeletes(IndexReader, int) always creates TermDocs and 
IndexSearcher, even if there were no deletes by Term or by Query. The attached 
patch wraps those creations w/ checks on whether there were any deletes by 
these two. Additionally, the searcher wasn't closed in a finally block, so I 
fixed that as well.

I'll attach a patch shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to