Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

numDocs() after undeleteAll()

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


koji.sekiguchi at m4

Jan 8, 2006, 8:17 AM

Post #1 of 3 (632 views)
Permalink
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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


yseeley at gmail

Jan 8, 2006, 8:24 AM

Post #2 of 3 (574 views)
Permalink
Re: numDocs() after undeleteAll() [In reply to]

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 <koji.sekiguchi [at] m4> 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 [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


koji.sekiguchi at m4

Jan 8, 2006, 8:36 AM

Post #3 of 3 (577 views)
Permalink
RE: numDocs() after undeleteAll() [In reply to]

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 [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.