You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2011/03/28 14:45:06 UTC

[jira] [Commented] (LUCENE-2996) addIndexes(IndexReader) incorrectly applies existing deletes

    [ https://issues.apache.org/jira/browse/LUCENE-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012028#comment-13012028 ] 

Simon Willnauer commented on LUCENE-2996:
-----------------------------------------

Shai, patch looks ok.

shouldn't the test use  newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()) instead of new IndexWriterConfig(...)

> addIndexes(IndexReader) incorrectly applies existing deletes
> ------------------------------------------------------------
>
>                 Key: LUCENE-2996
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2996
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 3.1.1, 3.2, 4.0
>
>         Attachments: LUCENE-2996.patch
>
>
> If you perform these operations:
> # deleteDocuments(Term) for all the new documents
> # addIndexes(IndexReader)
> # commit
> Then addIndexes applies the previous deletes on the incoming indexes as well, which is incorrect. If you call addIndexes(Directory) instead, the deletes are applied beforehand, as they should. The solution, as Mike indicated here: http://osdir.com/ml/general/2011-03/msg20876.html is to add *flush(false,true)* to addIndexes(IndexReader).
> I will create a patch with a matching unit test shortly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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