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

Michael McCandless commented on LUCENE-5741:
--------------------------------------------

The SegmentInfoPerCommit from the reader should be the very same instance as 
the one inside IndexWriter's SegmentInfos, and so the Object.equals impl (using 
==) works here.

So we need to figure out why in your case == returns false.  Can you describe 
where the reader that you are passing in came from?  It must be a 
near-real-time reader in order to work.

Or can you make a small test case?

> IndexWriter.tryDeleteDocument does not work
> -------------------------------------------
>
>                 Key: LUCENE-5741
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5741
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.3, 4.5, 4.6, 4.7, 4.8, 4.8.1
>            Reporter: Zhuravskiy Vitaliy
>            Assignee: Michael McCandless
>            Priority: Critical
>
> I am using "fresh"a and opened reader. 
> One segement and 3 documents in index.
> tryDeleteDocument always return false, i deep into your code, and see follow, 
> that 
> segmentInfos.indexOf(info)
> always return -1 because org.apache.lucene.index.SegmentInfoPerCommit doesnot 
> have equals method, see screenshoot for more inforamtion 
> http://postimg.org/image/jvtezvqnn/



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to