lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Why doesn't IndexWriter have delete()?
Date Fri, 06 Dec 2002 23:24:07 GMT
Perhaps IndexWriter is badly named.  It might better be called 
IndexAppender.  It doesn't normally touch any of the index but the list 
of segments, unless it has to merge some segments, in which case it 
usually only touches a small subset of the index data.

IndexReader, on the other hand, is the class that knows how to parse all 
of an index and make sense of it.  Deletion requires that the document 
be located, which requires parsing the index, so it's an IndexReader 
method.  Perhaps IndexReader should be called IndexParser...

I hope that helps.


Spencer, Dave wrote:
> I'm sure this has been covered before but 
> I didn't see an obvious match after
> searching the mailing list:
> Why doesn't IndexWriter have a delete method?
> And related to this is why does IndexReader have it?
> Every time I use IndexReader I think of it as
> an r/o view of the index, which is wrong, as it's the 
> only place where you can delete documents.
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

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

View raw message