Cam Bazz wrote:

Yes, I noticed
http://www.archivum.info/[EMAIL PROTECTED]/2006-09/ msg00065.html

Somehow I gotta do my delete within the same writer. I could use another
field that combines both src and dst field, and use this field without
storing but still a waste of resources.

I wonder if IndexWriter can be modified to accept a boolean query with termA
and termB - instead of single term?

If we go this route, we should add deleteByQuery to IndexWriter, which I think is a good idea, but just hasn't been done yet....

It was discussed before, in the context of LUCENE-565, but never actually added to IndexWriter. I think the approach would be similar to how IndexWriter now deletes by Term.

I read the code until the part where deleted the term is added to a hashmap,
but could not follow on after that.

Basically, the terms are buffered into a HashMap. Then when a flush happens, a SegmentReader is opened one by one on all segments, and the delete is applied to each segment. Special logic is used to apply the delete to the just-flushed segment since you have to take care to only delete docIDs up until the point when the delete by term was called.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to