RE: Lucene 4.0 delete by ID

2012-10-29 Thread Scott Smith
Scott -Original Message- From: martijn.is.h...@gmail.com [mailto:martijn.is.h...@gmail.com] On Behalf Of Martijn v Groningen Sent: Sunday, October 28, 2012 3:24 PM To: java-user@lucene.apache.org Subject: Re: Lucene 4.0 delete by ID A top level document ID can change over time. For that

RE: Lucene 4.0 delete by ID

2012-10-29 Thread Scott Smith
The lucene integer doc id. -Original Message- From: Lance Norskog [mailto:goks...@gmail.com] Sent: Sunday, October 28, 2012 5:09 PM To: java-user@lucene.apache.org Subject: Re: Lucene 4.0 delete by ID Scott, did you mean the Lucene integer id, or the unique id field? - Original

Re: Lucene 4.0 delete by ID

2012-10-28 Thread Lance Norskog
Scott, did you mean the Lucene integer id, or the unique id field? - Original Message - | From: "Martijn v Groningen" | To: java-user@lucene.apache.org | Sent: Sunday, October 28, 2012 2:24:29 PM | Subject: Re: Lucene 4.0 delete by ID | | A top level document ID can change

Re: Lucene 4.0 delete by ID

2012-10-28 Thread Martijn v Groningen
A top level document ID can change over time. For that reason you shouldn't rely on it. However if you know your index is stable or you keep track when a merge happes, you can use the IndexWriter#tryDeleteDocument method to delete a document by Lucene id. Deleting a document via a IndexReader is no

Re: Lucene 4.0 delete by ID

2012-10-26 Thread Mossaab Bagdouri
Lucene document IDs are not stable. You could add a field with an ID that you maintain. Your query would then be just a TermQuery on the ID. Regards, Mossaab 2012/10/26 Scott Smith > I'm currently converting some lucene code to 4.0. It appears that you are > no longer allowed to delete a docu

Lucene 4.0 delete by ID

2012-10-26 Thread Scott Smith
I'm currently converting some lucene code to 4.0. It appears that you are no longer allowed to delete a document by its ID. Is that correct? Is my only option to figure some kind of query (which obviously isn't based on ID) and do the delete from there?