Reputation: 6807
I am using lucene 3.5.0. I used IndexWriter.deleteDocuments(new Term(field, value)) to delete the index. I performed a delete and there were no exceptions. But still I could find the Lucene document of the particular field while I search. I am able see the document values in the index file(.fdt file) in the file system. How to crosscheck it?
Upvotes: 0
Views: 313
Reputation: 2473
Have you called IndexWriter's commit() or close() after calling deleteDocuments(Term)? Deletions are not visible to IndexReader (and therefore IndexSearcher) until either commit() or close() is called.
Upvotes: 1