lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENENET-90) Nunit test for TestIndexModifier.TestIndex
Date Fri, 24 Aug 2007 07:10:33 GMT

    [ https://issues.apache.org/jira/browse/LUCENENET-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522399
] 

Digy commented on LUCENENET-90:
-------------------------------

Hi George,

I looked at the java version of testIndexModifier and saw that the line causing the test to
fail is commented out.
       // depend on merge policy - Assert.AreEqual(3, i.DocCount());
So with a minimal patch that test can succeed(I will attach the new patch for TestIndexModifier).

But the real problem continues to exist. IndexWriter does not give the "real" document number
till segments are merged and DocCount is used everywhere (including other tests) with that
logic(Codes using the docCount know that issue). But in this case, there are no way to get
the "real DocCount" using APIs.

 Therefore i think java version should also be updated like in these patches.

DIGY



> Nunit test for TestIndexModifier.TestIndex
> ------------------------------------------
>
>                 Key: LUCENENET-90
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-90
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Digy
>            Priority: Minor
>         Attachments: IndexModifier.patch, IndexWriter.patch, TestIndexModifier.patch,
TestIndexModifier2.patch
>
>
> IndexModifier uses DocCount of IndexWriter which returns the count of all documents(including
deleted ones) unless segments are merged(ex. when explicitely  calling Optimize). Changing
the DocCount of IndexWriter effects other parts of the project. So I added a new method "DocCountExcludingDeletedDocs"
to IndexWriter and used it in IndexModifier. 
> With this patch Nunit test succeeds.
> I will also add a patch for a new test method "TestIndexModifierDocCount" into the TestIndexModifier.cs

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


Mime
View raw message