I'm using Lucene 4.10.0 and I wanna know how to delete a document by LongField. In practise I index documents that are identified by unique id (something like ISBN). I store the id with LongField :
doc.add(new LongField(Book.ID, item.getISBN(),Field.Store.YES));
How is possible to delete it by this unique id?
I know that for my version exist methods
deleteDocuments(Query queries)
deleteDocuments(Term terms)
of class IndexWriter, but the conscructor of Term doesn't allow Long value (and using the "trick" of parse long in String doesn't work) and with queries I'm not too much able. Any help or suggestion is really appreciated.