lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giulio Cesare Solaroli <giulio.ces...@gmail.com>
Subject Re: Deleting a document with an IndexWriter open
Date Tue, 20 Jul 2004 15:19:28 GMT
So, I was not thinking that much different. :-]

Giulio Cesare

On Tue, 20 Jul 2004 14:37:11 +0200, Christoph Goller
<goller@detego-software.de> wrote:
> Giulio Cesare Solaroli wrote:
> > Hi all,
> >
> > I would like to submit a "think different" approach to this problem
> > for evaluation for you developers.
> >
> > Would it be possible to just mark the relevant documents as "deleted"
> > (instead of deleting them altogether) with an IndexWriter used for
> > inserting new documents?
> >
> > "marking" a document as deleted would leave it on the index, but it
> > would not include it in any result set.
> >
> > At a later time, an IndexReader could be opened to really delete all
> > "marked" documents.
> >
> > Does this approach is compatible with Lucene architecture?
> 
> It´s already done in a quite similar fashion, but the roles of
> IndexReader and IndexWriter are exchanged. If you call delete with
> an IndexReader, the document(s) are only marked as deleted. You might
> even call undeletAll to undo the deletion. It´s only with the next
> explicit optimize or implicit merge from an IndexWriter that the
> document(s) are irreversibly deleted.
> 
> Christoph
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 
>

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


Mime
View raw message