I don't know if this helps, but this is what I do. I believe this is
correct, but I have just finished impl and haven't tested it fully:

-> keep referrence to valid searcher
-> open a reader on the old index
-> open a writer to a tmp Directory (RAM of FS)
-> find removed/modified files, remove from reader and add (if update, or
new document) to writer
-> close reader, open writer on master dir merge with tmp dir
-> update searcher reference

This "seems" to work while there is concurrent requests, but I need to be
more thorough.
HTH,
sv

On Wed, 28 Jul 2004, jitender ahuja wrote:

> Hi all,
>           I am trying to make an automatic index update file based o a background 
> thread, but it gives errors in deleting the existing index, if (only if) the server 
> accesses the index at the same time or has once accessed it and even if a different 
> request is posed, i.e. for a different index directory or a different job, it makes 
> no difference.
> Can anyone tell that in such a continous update scenario, how the old index can be 
> updated as I feel deletion is a must of the earlier contents so as to get the new 
> contents in place.
>
> Regards,
> Jitender


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

Reply via email to