lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksander M. Stensby" <>
Subject Re: Removing document from index
Date Wed, 28 Jun 2006 13:58:17 GMT
My bet is that after updating /appending to an index, the searcher object  
used also need to be updated, so that it will work agains the new snapshot  
of the index.


1. keep a single open IndexReader used by all searches

2. Every few minutes, process updates as follows:

   a. open a second IndexReader

   b. delete all documents that will be updated

   c. close this IndexReader, to flush deletions

   d. open an IndexWriter

   e. add all documents that are updated

   f. close the IndexWriter

   g. replace the IndexReader used for searches (1, above)

On Wed, 28 Jun 2006 15:53:38 +0200, Leandro Saad <>  

> Hi all. I can remove a documents from the index using IndexReader.delete
> (Term) but the search still returns this document.
> What am I doing wrong?

Aleksander M. Stensby
Software Developer
Integrasco A/S
Tlf.: +47 41 22 82 72

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message