I've got a versioning content system where I want to replace documents in
a lucene repository. To do so, according to the FAQ and the mailing list
archives, I need to open an IndexReader, look for the document in
question, delete it via the IndexReader, and then add it.
This shouldn't replace the
Then this means that my IndexReader.delete(i) isn't working properly. What
would be the common causes for this? My log shows the documents being
deleted, so something's going wrong at that point.
On Wed, 5 Mar 2003, Doug Cutting wrote:
Joseph Ottinger wrote:
This shouldn't replace the
Joseph Ottinger wrote:
Then this means that my IndexReader.delete(i) isn't working properly. What
would be the common causes for this? My log shows the documents being
deleted, so something's going wrong at that point.
Are you closing the IndexReader after doing the deletes? This is
required for
Okay, I think I've done something stupid here: on closer examination, it
looks like my comparison to find the specific documents to delete is
failing. Let me look further at that.
On Wed, 5 Mar 2003, Doug Cutting wrote:
Joseph Ottinger wrote:
Then this means that my IndexReader.delete(i) isn't
Okay, I found the problem: it was a stupid coder. To wit, here's the
salient code:
Document d=indexReader.document(i);
if(d.getField(key).equals(node.getKey()) {
...
}
The error, of course, is that getField.equals() is comparing FIELDS and
not string values. When I changed this to pull the