Sunil Kumar PK wrote:
could you please explain?

On 10/26/06, Karel Tejnora <[EMAIL PROTECTED]> wrote:
Nope. IndexReader obtains a snapshot of index - not closing and opening
indexreader leads to not deleting files (windows exception, linux will
not free them).
> Is it possible to get all the matching document in the result without
> restarting the Searcher program?

A searcher once created only searches the index as of the "point in time" that it was created. Ie, it's an unchanging snapshot. So any deletes/updates that happen to the index by a writer will not be visible until you close and reopen another searcher.

This "point in time" searching relies on certain properties of the underlying filesystem in order to work properly. Windows local and remote (SMB) filesystems work because files that are open can't be deleted (and Lucene just retries); local UNIX filesystems work because the open file handle can still access a deleted file ("delete on last close").

However: NFS does not have "delete on last close", so you can't rely on "point in time" searching when using NFS across machines (it's possible a single machine may work). If a writer on a different machine has committed to the index that a searcher is using over NFS then the searcher will eventually hit an IOException with "stale NFS handle". See here for details on current known issues with NFS:

  http://issues.apache.org/jira/browse/LUCENE-673

Mike

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

Reply via email to