If another process has an index open for updates it will be locked and
you can test that with IndexWriter.isLocked(directory), but that's
about it.  An OS command like lsof on unix could be used to see if any
processes on the same server have index files open but if you're using
NFS that won't detect processes on other servers.  Lucene and NFS
don't always work well together - generally better to use local files
if you can.


--
Ian.


On Mon, Dec 12, 2011 at 10:09 AM, Rui Wang <[email protected]> wrote:
> Hi All,
>
> I am just wondering given a existing index folder, is there a way of 
> detecting whether this index is in use?
>
> Either by IndexReader or IndexWriter, What about on NFS file system? Is there 
> any difference?
>
> Thank you for the help in advance,
> Rui Wang
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to