On Dienstag, 17. Juni 2008, SEAN MCELROY wrote: > This code doesn't work. I have tried IndexWriter.updateDocument and it > also does not work. Is is because I have an IndexWriter open when I try > to delete the document?
IndexWriter now has its own delete() method, you should try to use that. Also you need to re-open any readers to actually see your deletions. BTW, what you're trying to do is part of the Lucene demo code. It's a bit complicated, but the implementation in the demo code should be very efficient I think. Regards Daniel -- http://www.danielnaber.de
