Hi  Thomas,

> Is it possible to update fields in an existing index.
> If yes how to proceed.
> 
I think you can only delete a document and then reindex the updated
document:

    public static int  delTitle(String ID) {
        try {
                return writer.deleteDocuments(new Term("ID",ID));               
                } catch (IOException e) {
                        e.printStackTrace();
                }
                return -1;
    }
and then add the new document.

The prerequisite will be that you need a unique Identifier for that
Document to use for the deleteDocuments function (normally you won't
know the lucene's index document-id for the specific doc). The downside
of this is that the lucene-index document-id will change.

hth,
martin




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

Reply via email to