This is my code for the delete
TermEnum uidIter = reader.terms(new Term("uri", "jdbc://theHost/thePath#uuid=8c5419bc0a28645e0089db9a0000016b"); while(uidIter.next()) { Term t = uidIter.term(); getLogger().debug("unindexing text() " + t.text());
reader.delete(t); }
My debug statement shows me that it deletes the wrong document... 10:59:30,577 DEBUG [DocumentIndexerService] unindexing text() jdbc://theHost/thePath#uuid=8dc8946e0a28645e01a428240000000e
If you only want to delete a single document, why are you iterating? What you are doing is starting the enumeration at the term from reader.terms() and then deleting all documents from there forward, except you are doing a .next() first and skipping the one you really wanted to delete. To delete just the one you want, do this:
reader.delete(new Term("uri","jdbc://theHost/ thePath#uuid=8c5419bc0a28645e0089db9a0000016b"))
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
