This is kind of a problem, in order to delete documents using terms you need
to have a keyword field which contain a unique value, otherwise you might
ending deleting more then you want.

-----Original Message-----
From: Mike Hogan [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 05, 2003 1:06 PM
To: [EMAIL PROTECTED]
Subject: How would you delete an entry that was indexed like this


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to