Re: Lucene deleteDocument

2015-06-20 Thread Erick Erickson
Additionally (and I haven't been in low-level Lucene for a LONG time so caveat emptor), in general ID types should not be tokenized. I'd model my field definition after the Lucene StringField class. It looks like you can avoid defining a FieldType altogether and just use StringField.TYPE_STORED for

Re: Lucene deleteDocument

2015-06-20 Thread Đạt Cao Mạnh
You can check following possibilities : - doc.id.toString() return same string for all of your documents. - your tokenstream for doc.id.toString() return same token for all of your documents. Ex: id "1 23" -> {"1","23"}. id "1 56" -> {"1","56"}. So when you delete document by using iw.deleteDocumen

Lucene deleteDocument

2015-06-20 Thread Behnam Khoshsafar
I'm using Lucene 5.1.0 to index a document and search it. I have a lot of documents, over 100, which are stored in a database. When I start running the project for the first time, I use Lucene to index these documents. Now I want to delete one document from the database and indexes. I also c