lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Hogan" ...@mikehogan.net>
Subject How would you delete an entry that was indexed like this
Date Fri, 05 Dec 2003 18:05:59 GMT
Hi,

If I index a document like this:

IndexWriter writer = createWriter();
Document document = new Document();
document.add(Field.Text(ID_FIELD_NAME, componentId));
document.add(Field.Text(CONTENTS_FIELD_NAME, componentDescription));
writer.addDocument(document);
writer.optimize();
writer.close();

What code must I execute to later delete the document (I tried following the
docs and whats done in the code and test cases.  I saw Terms being used to
ID the document to delete.  But I am not clear what value to put in the
Term, as I do not know how Terms relate to Fields).

Many thanks,
Mike.


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message