[ 
https://issues.apache.org/jira/browse/LUCENENET-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Garski updated LUCENENET-257:
-------------------------------------

    Attachment: LUCENENET-257.patch

Got it.  The issue was subtle and was a pain to find as an overflow on a long 
was being suppressed in the ctor of LogByteSizeMergePolicy that always set the 
value of maxMergeSize to long.MinValue.  The behavior in Java is different, 
hence that test ran fine.

I altered the DEFAULT_MAX_MERGE_MB to be a long (it is only used in the ctor of 
LogByteSizeMergePolicy) and have it set to Int64.MaxValue, which in turn is 
what the field maxMergeSize is set to.

No other changes are required to ensure this test passes.

> TestCheckIndex.TestDeletedDocs 
> -------------------------------
>
>                 Key: LUCENENET-257
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-257
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Andrei Iliev
>            Assignee: Digy
>         Attachments: LUCENENET-257.patch
>
>
> Setting writer.SetMaxBufferedDocs(2) couse flushing buffers after adding 
> every 2 docs. That  results in total 10 segments in the index and failing 
> TestDeletedDocs (test case assumes that there is only 1 segment file).  So 
> question arise:
> 1) does performing a flush has to start a new segment file?
> 2) if so, in order  to  run TestDeletedDocs smoothly either change  
> writer.SetMaxBufferedDocs(2) to, say,    writer.SetMaxBufferedDocs(20) or 
> call writer.optimize(1) before closing writer.

-- 
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