You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Koji Sekiguchi <ko...@m4.dion.ne.jp> on 2006/01/08 17:17:02 UTC

numDocs() after undeleteAll()

Hello Luceners!

steps:

1. index has 15 docs and has no deleted docs
2. call IndexReader.delete(Term) and 6 docs are deleted
3. now maxDoc() == 15, numDocs() == 9
4. call IndexReader.undeleteAll()
5. maxDoc() == 15, numDocs() == 9	<<???>>
6. close IndexReader and open again
7. now maxDoc() == 15, numDocs() == 15


I expected numDocs() returns 15 at step 5.
Am I wrong? I'm using Lucene 1.9.
The program is single thread and use single IndexReader
and threre is no other processes touch the index directory.

Thanks in advance,

Koji




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: numDocs() after undeleteAll()

Posted by Koji Sekiguchi <ko...@m4.dion.ne.jp>.
Yonik,

> Are you using the latest version of Lucene (after Dec 8th)?  There was
> a bug fix regarding this:
> 
> http://issues.apache.org/jira/browse/LUCENE-479

Thank you. Fixed!

Koji




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: numDocs() after undeleteAll()

Posted by Yonik Seeley <ys...@gmail.com>.
Are you using the latest version of Lucene (after Dec 8th)?  There was
a bug fix regarding this:

http://issues.apache.org/jira/browse/LUCENE-479

-Yonik

On 1/8/06, Koji Sekiguchi <ko...@m4.dion.ne.jp> wrote:
> Hello Luceners!
>
> steps:
>
> 1. index has 15 docs and has no deleted docs
> 2. call IndexReader.delete(Term) and 6 docs are deleted
> 3. now maxDoc() == 15, numDocs() == 9
> 4. call IndexReader.undeleteAll()
> 5. maxDoc() == 15, numDocs() == 9       <<???>>
> 6. close IndexReader and open again
> 7. now maxDoc() == 15, numDocs() == 15
>
>
> I expected numDocs() returns 15 at step 5.
> Am I wrong? I'm using Lucene 1.9.
> The program is single thread and use single IndexReader
> and threre is no other processes touch the index directory.
>
> Thanks in advance,
>
> Koji
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org