On Tue, 2004-11-23 at 13:59, Santosh wrote: > I am using lucene for indexing, when I am creating Index the docuemnts are > added. but when I want to modify the single existing document and reIndex > again, it is taking as new document and adding one more time, so that I am > getting same document twice in the results. > To overcome this I am deleting existing Index and again recreating whole > Index. but is it possibe to index the modified document again and overwrite > existing document without deleting and recreation. can I do this? If so how?
You do not need to recreate the whole index. Just mark the document as deleted using the IndexReader and then add it again with the IndexWriter. Remember to close your IndexReader and IndexWriter after doing this. The deleted document will be removed the next time you optimize your index. Luke Francl --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
