I am trying to build my indices file while still allowing my application to add 
new information and I my application cannot obtain the lock.

Here is a little pseudo code on what I am trying to do:

Build Indicies:

1.       For each element (i.e. I have n elements I want to add to the index)

2.       Create IndexWriter (this gets the lock)

3.       Add document

4.       Optimize IndexWriter

5.       Close IndexWriter

Application

1.       Application submits one new element

2.       Create IndexWriter (this gets the lock)

3.       Add document

4.       Optimize IndexWriter

5.       Close IndexWriter

So again my problem is that the application cannot get the lock file while I am 
building the index file.  I am sure that the writer in the build indices loop 
is closed after each element is added therefore releasing the lock.  I have set 
the WRITE_LOCK_TIMEOUT to 10 seconds.  I can see the build indices process 
close the writer many times over those 10 seconds, but I see the application 
wait 10 seconds and timeout with a lock timeout exception.  The loop in the 
build indices process is running very fast but I would guess that when the 
application asks for the lock it should be able to see the lock free (even for 
just a short amount of time) because it should be next in line.   Am I doing 
something fundamentally wrong here, or is this a problem with the way lucene 
locks.

Thanks,
Billy


________________________________
This e-mail and any files transmitted with it may be proprietary and are 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this e-mail in error please notify the sender.
Please note that any views or opinions presented in this e-mail are solely 
those of the author and do not necessarily represent those of ITT Corporation. 
The recipient should check this e-mail and any attachments for the presence of 
viruses. ITT accepts no liability for any damage caused by any virus 
transmitted by this e-mail.

Reply via email to