lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Keays <>
Subject IndexWriter.deleteDocuments(term) deletes everything
Date Wed, 28 Mar 2007 02:58:26 GMT
Hi there,

I'm trying to delete a single document by using its uuid field:

     uuid = new Term("uuid", item.getUuid().toString());

However, it appears that this operation is deleting *every* document, 
whether the uuid matches or not. The uuid field is created with

     doc.add(new Field("uuid", item.getUuid().toString(),
             Field.Store.YES, Field.Index.UN_TOKENIZED));

and I can make queries like uuid:76 which return the correct document. 
Is there something wrong with the way I am using deleteDocuments()? I'm 
using lucene-2.1.0.

Thanks in advance,


Ninth Avenue Software
p: +61 7 3137 1351 (UTC +10)
f: +61 7 3102 9141

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message