Hello I am trying to delete all docs in my index containing a field with a given value. The API says that the delete( term ) method in IndexReader can do that for me. The problem is that it doesn't seem to work properly. When i apply the delete( term ) method to docs where i know that only one document exists with the given ID, the document is deleted as it should be, but when there are more documents with the same ID, nothing happens. It should be said that alle documents have a unique ID and some documents furthermore have another ID field called modelTreeFileID, which indicates membership to a group of documents.
This little code snippet is how I am doing it : IndexReader ir = IndexReader.open( pathToIndex ); Term term = new Term( "modelTreeFileID", "324i28383gvvb" ); ir.delete( term ); if only one document was found with the value 324i28383gvvb was found, it is deleted, but if more documents were found they are not :-( Is this a bug in IndexReader or am i doing something wrong. Any help is appreciated. /Lars Hammer http://www.dezide.com