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-60) "IndexModifier.DocCount" does not always give the correct result.
Date Thu, 16 Aug 2007 21:47:30 GMT

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

Digy commented on LUCENENET-60:
-------------------------------

Hi George,

Yes, you are right, but till the bug is found this patch can be used to get the correct DocCount.

DIGY

> "IndexModifier.DocCount" does not always give the correct result.
> -----------------------------------------------------------------
>
>                 Key: LUCENENET-60
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-60
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Digy
>            Priority: Minor
>         Attachments: IndexModifier.patch
>
>
> to pass the nunit-test for IndexModifier,  "DocCount" method should be changed as below.
(indexWriter does not give the correct result. So use the indexReader).
>         public virtual int DocCount()
>         {
>             lock (directory)
>             {
>                 AssureOpen();
>                 CreateIndexReader();
>                 return indexReader.NumDocs();
>             }
>         }

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