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.

Mike

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to