FAQ
what is the behaviour of IndexReader.current() if i modify the index
manually? Will it returns false?

One more question

The index is on Linux

if my indexReader is open and some of the files in index are deleted, what
is the behaviour of this?

Will it give any exception like File Not found??

Any help is appreciated

Thanks
Rahul.


--
View this message in context: http://www.nabble.com/IndexReader.isCurrent%28%29-tp19523435p19523435.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Michael McCandless at Sep 17, 2008 at 9:41 am

    rahul_k123 wrote:

    what is the behaviour of IndexReader.current() if i modify the index
    manually? Will it returns false?
    What do you mean by "manually"?

    Once an IndexWriter commits a change to the index after the
    IndexReader was opened, then IndexReader.isCurrent() will return false.
    One more question

    The index is on Linux

    if my indexReader is open and some of the files in index are
    deleted, what
    is the behaviour of this?

    Will it give any exception like File Not found??
    Assuming it's a local filesystem on Linux (eg, not NFS) then if
    IndexReader has the file open and you delete it from the filesystem,
    that IndexReader is unaffected.

    But, you should not delete files yourself -- IndexWriter does that for
    you at the right times.

    Mike

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Rahul_k123 at Sep 17, 2008 at 4:19 pm
    I am doing replication and i am running scripts to sync the index b/w master
    and slave.



    Michael McCandless-2 wrote:

    rahul_k123 wrote:
    what is the behaviour of IndexReader.current() if i modify the index
    manually? Will it returns false?
    What do you mean by "manually"?

    Once an IndexWriter commits a change to the index after the
    IndexReader was opened, then IndexReader.isCurrent() will return false.
    One more question

    The index is on Linux

    if my indexReader is open and some of the files in index are
    deleted, what
    is the behaviour of this?

    Will it give any exception like File Not found??
    Assuming it's a local filesystem on Linux (eg, not NFS) then if
    IndexReader has the file open and you delete it from the filesystem,
    that IndexReader is unaffected.

    But, you should not delete files yourself -- IndexWriter does that for
    you at the right times.

    Mike

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    View this message in context: http://www.nabble.com/IndexReader.isCurrent%28%29-tp19523435p19535854.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Michael McCandless at Sep 18, 2008 at 4:09 pm
    IndexReader.isCurrent() goes and opens that most recent segments_N
    file from the index and then compares that version to its own. So if
    your replication brought over a new segments_N then isCurrent would
    return false.

    Mike

    rahul_k123 wrote:
    I am doing replication and i am running scripts to sync the index b/
    w master
    and slave.



    Michael McCandless-2 wrote:

    rahul_k123 wrote:
    what is the behaviour of IndexReader.current() if i modify the index
    manually? Will it returns false?
    What do you mean by "manually"?

    Once an IndexWriter commits a change to the index after the
    IndexReader was opened, then IndexReader.isCurrent() will return
    false.
    One more question

    The index is on Linux

    if my indexReader is open and some of the files in index are
    deleted, what
    is the behaviour of this?

    Will it give any exception like File Not found??
    Assuming it's a local filesystem on Linux (eg, not NFS) then if
    IndexReader has the file open and you delete it from the filesystem,
    that IndexReader is unaffected.

    But, you should not delete files yourself -- IndexWriter does that
    for
    you at the right times.

    Mike

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    View this message in context: http://www.nabble.com/IndexReader.isCurrent%28%29-tp19523435p19535854.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedSep 17, '08 at 12:41a
activeSep 18, '08 at 4:09p
posts4
users2
websitelucene.apache.org

2 users in discussion

Rahul_k123: 2 posts Michael McCandless: 2 posts

People

Translate

site design / logo © 2022 Grokbase