[ 
https://issues.apache.org/jira/browse/LUCENENET-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782653#action_12782653
 ] 

Andrei Iliev commented on LUCENENET-287:
----------------------------------------

Don't forget  to override GetHashCode., e.g 
        public override  int GetHashCode()
        {

            int h = 1;
            for (int i = 0; i< this.Count; i++)
            {
                SegmentInfo si = (this[i] as SegmentInfo) 
                h = 31 * h + (si == null ? 0 : si.GetHashCode());
            }

            return h;
        }


> TestIndexWriterReader.TestUpdateDocument  
> ------------------------------------------
>
>                 Key: LUCENENET-287
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-287
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Andrei Iliev
>         Attachments: SegmentInfos.patch, SegmentInfos2.patch, 
> SegmentInfos3.patch
>
>
> SegmentInfos  is derived from ArrayList. So Equals and GetHashCode should 
> behave as java ArrayList (see LUCENENET-284).
> After that patch TestIndexWriterReader.TestUpdateDocument is passed.

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

Reply via email to