FAQ
hello all ,

am merging more than one indexes to search a document , how do i use
IndexReader here to open multiple indexes? (since IndexReader will open one
directory at a time) could any1 please suggest me?


--
View this message in context: http://www.nabble.com/index-reader-for-multiple-indexes-tp25716741p25716741.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

  • Uwe Schindler at Oct 2, 2009 at 5:13 pm
    Use MultiReader which is an IndexReader on top of various Sub-IndexReaders.

    -----
    Uwe Schindler
    H.-H.-Meier-Allee 63, D-28213 Bremen
    http://www.thetaphi.de
    eMail: uwe@thetaphi.de
    -----Original Message-----
    From: m.harig
    Sent: Friday, October 02, 2009 6:52 PM
    To: java-user@lucene.apache.org
    Subject: index reader for multiple indexes


    hello all ,

    am merging more than one indexes to search a document , how do i
    use
    IndexReader here to open multiple indexes? (since IndexReader will open
    one
    directory at a time) could any1 please suggest me?


    --
    View this message in context: http://www.nabble.com/index-reader-for-
    multiple-indexes-tp25716741p25716741.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
  • M.harig at Oct 3, 2009 at 6:40 am
    Thanks Uwe Schindler ,

    If i use an IndexReader[] to use MultiReader , will it be thread
    safe? because i've to reopen my IndexReader to check whether my index is
    updated or not . In this case how do i handle it? please suggest me



    Uwe Schindler wrote:
    Use MultiReader which is an IndexReader on top of various
    Sub-IndexReaders.

    -----
    Uwe Schindler
    H.-H.-Meier-Allee 63, D-28213 Bremen
    http://www.thetaphi.de
    eMail: uwe@thetaphi.de
    -----Original Message-----
    From: m.harig
    Sent: Friday, October 02, 2009 6:52 PM
    To: java-user@lucene.apache.org
    Subject: index reader for multiple indexes


    hello all ,

    am merging more than one indexes to search a document , how do i
    use
    IndexReader here to open multiple indexes? (since IndexReader will open
    one
    directory at a time) could any1 please suggest me?


    --
    View this message in context: http://www.nabble.com/index-reader-for-
    multiple-indexes-tp25716741p25716741.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

    --
    View this message in context: http://www.nabble.com/index-reader-for-multiple-indexes-tp25716741p25726159.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
  • David Causse at Dec 9, 2009 at 5:55 pm

    On Fri, Oct 02, 2009 at 11:40:09PM -0700, m.harig wrote:

    Thanks Uwe Schindler ,

    If i use an IndexReader[] to use MultiReader , will it be thread
    safe? because i've to reopen my IndexReader to check whether my index is
    updated or not . In this case how do i handle it? please suggest me
    Hi,

    AFAIK readers are cloned when they are used inside MultiReader, so I
    guess reopening a single reader outside MultiReader has no effect and
    reopen on MultiReader reopen all the readers.

    So I think there is no way to reopen one specific reader inside a
    MultiReader without a new instance of the MultiReader.

    IMHO the easy way is to use MultiReader as a normal reader (with
    default constructor MultiReader(IndexReader... readers) ), forget the
    original readers and use reopen on the MultiReader. It should be
    thread-safe.
    You should check the sources for more complicated usage.


    Uwe Schindler wrote:
    Use MultiReader which is an IndexReader on top of various
    Sub-IndexReaders.

    -----
    Uwe Schindler
    H.-H.-Meier-Allee 63, D-28213 Bremen
    http://www.thetaphi.de
    eMail: uwe@thetaphi.de
    -----Original Message-----
    From: m.harig
    Sent: Friday, October 02, 2009 6:52 PM
    To: java-user@lucene.apache.org
    Subject: index reader for multiple indexes


    hello all ,

    am merging more than one indexes to search a document , how do i
    use
    IndexReader here to open multiple indexes? (since IndexReader will open
    one
    directory at a time) could any1 please suggest me?


    --
    View this message in context: http://www.nabble.com/index-reader-for-
    multiple-indexes-tp25716741p25716741.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

    --
    View this message in context: http://www.nabble.com/index-reader-for-multiple-indexes-tp25716741p25726159.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
    --
    David Causse
    Spotter
    http://www.spotter.com/

    ---------------------------------------------------------------------
    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
postedOct 2, '09 at 4:53p
activeDec 9, '09 at 5:55p
posts4
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase