OK, the reference field was not parsed. See:
}else if(key.equals(reference) ) {
reference = value;
Field fReference = new Field(reference,value,true,true,false);
doc.add(fReference);
On another examination of my program, the delete does seem to be
I've been merrily cooking along, thinking I was replacing documents when
I haven't. My logic is to go through a batch of documents, get a field
called reference which is unique build a term from it and delete it
via the reader.delete() method. Then I close the reader and open a
writer and
I've had success with deletion by running IndexReader.delete(int), then
getting an IndexWriter and optimizing the directory. I don't know if
that's the right way to do it or not.
On Tue, 1 Feb 2005, Jim Lynch wrote:
I've been merrily cooking along, thinking I was replacing documents when
I
Thanks, I'd try that, but I don't think it will make any difference. If
I modify the code to not reindex the documents, no files in the index
directory are touched, hence there is no record of the deletions
anywhere. I checked the count coming back from the delete operation and
it is zero.
Well, in LuceneRAR, the delete by id code does exactly what I said: gets
the indexreader, deletes the doc id, then it opens a writer and optimizes.
Nothing else.
On Tue, 1 Feb 2005, Jim Lynch wrote:
Thanks, I'd try that, but I don't think it will make any difference. If
I modify the code to
: anywhere. I checked the count coming back from the delete operation and
: it is zero. I even tried to delete another unique term with similar
: results.
First off, are you absolutely certain you are closing the reader? it's
not in the code you listed.
Second, I'd bet $1 that when your