FAQ
Hi,

I have two index files. I am searching id1 from Index A and id2 from Index B.
By using id1 (Index A) results , I am searching id2 from Index B. I stored these two index files in local file system.
I am using filter as a result of Index A.
IndexSearcher.search(Query,filter,10000);

I am running queries individually. Is there any possibility that I can combine these two queries into single query. Can I use Multi index search in this case ?

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

Search Discussions

  • Anshum at Feb 14, 2011 at 6:24 pm
    If you actually intend at getting the intersection of 2 results from a
    'union' of 2 indexes, you could use the filter and query approach. You could
    use a multi searcher or a parallel multi searcher to perform the search in
    this case.

    --
    Anshum Gupta
    http://ai-cafe.blogspot.com

    On Mon, Feb 14, 2011 at 11:46 PM, wrote:

    Hi,

    I have two index files. I am searching id1 from Index A and id2 from Index
    B.
    By using id1 (Index A) results , I am searching id2 from Index B. I stored
    these two index files in local file system.
    I am using filter as a result of Index A.
    IndexSearcher.search(Query,filter,10000);

    I am running queries individually. Is there any possibility that I can
    combine these two queries into single query. Can I use Multi index search in
    this case ?

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erick Erickson at Feb 15, 2011 at 1:26 pm
    This is usually something you should not do. Is there any possibility you can
    combine these indexes into one? Maybe sharded? Because this approach
    is almost guaranteed to scale poorly.

    This smells like an XY problem, perhaps you can back up and explain
    what the higher-level problem you're trying to solve is...

    See: http://people.apache.org/~hossman/#xyproblem

    Best
    Erick
    On Mon, Feb 14, 2011 at 1:16 PM, wrote:
    Hi,

    I have two index files. I am searching id1 from Index A and id2 from Index B.
    By using id1 (Index A) results , I am searching id2 from Index B. I stored these two index files in local file system.
    I am using filter as a result of Index A.
    IndexSearcher.search(Query,filter,10000);

    I am running queries individually. Is there any possibility that I can combine these two queries into single query. Can I use Multi index search in this case ?

    ---------------------------------------------------------------------
    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
  • Findbestopensource at Feb 16, 2011 at 7:50 am
    I don't think so, you could combine the queries. You are first searching
    Index A and the results are given as input to Index B. You cannot combine
    the queries and you cannot use multi searcher or parallel multi searcher.
    You need to search two indexes independently and sequentially.

    Regards
    Aditya
    www.findbestopensource.com


    On Mon, Feb 14, 2011 at 11:46 PM, wrote:

    Hi,

    I have two index files. I am searching id1 from Index A and id2 from Index
    B.
    By using id1 (Index A) results , I am searching id2 from Index B. I stored
    these two index files in local file system.
    I am using filter as a result of Index A.
    IndexSearcher.search(Query,filter,10000);

    I am running queries individually. Is there any possibility that I can
    combine these two queries into single query. Can I use Multi index search in
    this case ?

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • NhungLe at Jun 5, 2011 at 8:34 am
    Hi all,

    I have the same problem with Madhu, that i want to search over multi indexes
    and over different fields.
    Example: my search text: "lucene multi indexes",
    i want to search in index A (field: content1) and B (field: content2),
    and the each result must contains "lucene multi indexes".

    I tried to use MultiSearcher but I found that MultiSearcher returns the "OR"
    results not "AND"

    Dose any one know how lucene can do it? or suggest me another way to do it?

    Thanks,



    --
    View this message in context: http://lucene.472066.n3.nabble.com/Multi-Index-Search-Query-tp2494517p3025613.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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedFeb 14, '11 at 6:17p
activeJun 5, '11 at 8:34a
posts5
users5
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase