The code correctly reflects its designed semantics: numBufferedDeleteTerms is a simple sum of terms passed to updateDocument or deleteDocuments.
If the first of two successive calls to the same term should be considered no op if no docs were added in between, shouldn't the first also be considered no op if the docs added in between do not contain the term? Whether a doc contains a term, however, can only be determined at the time of actual deletion for performance reasons. Thus I think the original semantics is cleaner. Ning On 2/21/07, Doron Cohen (JIRA) <[EMAIL PROTECTED]> wrote:
bufferDeleteTerm in IndexWriter might flush prematurely ------------------------------------------------------- Key: LUCENE-808 URL: https://issues.apache.org/jira/browse/LUCENE-808 Project: Lucene - Java Issue Type: Bug Components: Index Affects Versions: 2.1 Reporter: Doron Cohen Successive calls to remove-by-the-same-term would increment numBufferedDeleteTerms although all but the first are no op if no docs were added in between. Hence deletes would be flushed too soon. It is a minor problem, should be rare, but it seems cleaner to fix this. Attached patch also fixes TestIndexWriterDelete.testNonRAMDelete() which somehow relied on this behavior. All tests pass. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]