lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: delete by doc id
Date Fri, 08 Aug 2008 23:30:44 GMT

It's risky.

How would you get the IDs to know which ones to delete?  A separate  
reader running on the side?

The problem is, as IndexWriter merges segments, the IDs shift.  Any  
reader you have already open won't see this shift (until you reopen  
it), so you could end up deleting the wrong IDs.


Cam Bazz wrote:

> hello,
> what would happen if I modified the class IndexWriter, and made the  
> delete
> by id method public?
> I have two fields in my documents and I got to be able to delete by  
> those
> two fields, (by query in other words) and I do not wish to go trunk  
> version.
> I am getting quite desperate, and if not found a solution I will  
> have to
> make my documents with 3 fields, a, b and a + b so I can delete by a  
> and b.
> Best.
> could there be a side effect?
> Best.
> -c.b.

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

View raw message