Nellaiyappan Gomathinayagam wrote:
Hi,
Actually already i have added some thousan documents for indexing. Now i need to include one more file for indexing. So if i recreate again, then it will take more time. So how to include this single file in the already existing index. is it possible. Will that code do the same thing wat i am expecting??

When our system does indexing updates, we do the following: 1. make a list of documents that have changed. 2. loop through the list of documents doing the following: a. remove those documents (if they exist) from the index. b. add those documents to a temp index 3. merge the temp index into the main index 4. record when we did the update.

You can't add and delete from an index at the same time (from our understanding), so this is why we're using the temp index. We have a last-updated value for every document in our system, so as an added benefit, if the update gets aborted mid-way through, there is minimal impact. The only downside is documents that have been updated are removed, but the next time the update runs, it will add those back in.

--
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]


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



Reply via email to