Document identifiers are internal to Lucene and should never be used. They are subject to change without notice, among other issues.
How do you get document IDs? Presumably through a request? Then just delete based on this query. In addition, if you have your own unique ID field, you can do writer.DeleteDocuments(new Term("MyIDField", "ID to delete"));
Xodarap
source share