Multisearcher question

2004-10-12 Thread Sreedhar, Dantam
Hi,

Index side information:

No. of indexes: Two (to explain better I call these as index_a and
index_b).

Fields in index_a: x and y.
Fields in index_b: y and z.

I have written a multisearch code like this.

Searcher search_a = new IndexSearcher(LOCATION_OF_INDEX_A);
Searcher search_b = new IndexSearcher(LOCATION_OF_INDEX_B);
Searcher[] searcher = new Searcher[2];
searcher[0] = search_a;
searcher[1] = search_b;
MultiSearcher searcher = new MultiSearcher(searcher);

I am getting the following results,

x:query  - WORKS
x:query AND y:query - WORKS
x:query AND z:query - DOESN'T WORK

Is this expected behavior?

My question is, Can MultiSearcher be used to search on indexes with
different fields? If yes, could you please correct the above code.

Thanks,
-Sreedhar


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



Re: Multisearcher question

2004-10-12 Thread Otis Gospodnetic
Hello Sreedhar,

This is the expected behaviour.  The query is run against each index,
and it won't have any matches in either index, because neither index
has both fields.

Otis

--- Sreedhar, Dantam [EMAIL PROTECTED] wrote:

 Hi,
 
 Index side information:
 
 No. of indexes: Two (to explain better I call these as index_a and
 index_b).
 
 Fields in index_a: x and y.
 Fields in index_b: y and z.
 
 I have written a multisearch code like this.
 
 Searcher search_a = new IndexSearcher(LOCATION_OF_INDEX_A);
 Searcher search_b = new IndexSearcher(LOCATION_OF_INDEX_B);
 Searcher[] searcher = new Searcher[2];
 searcher[0] = search_a;
 searcher[1] = search_b;
 MultiSearcher searcher = new MultiSearcher(searcher);
 
 I am getting the following results,
 
 x:query  - WORKS
 x:query AND y:query - WORKS
 x:query AND z:query - DOESN'T WORK
 
 Is this expected behavior?
 
 My question is, Can MultiSearcher be used to search on indexes with
 different fields? If yes, could you please correct the above code.
 
 Thanks,
 -Sreedhar
 
 
 -
 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]



RE: Multisearcher question

2004-10-12 Thread Sreedhar, Dantam
Thanks Otis for you reply.

If I want to solve the problem that I have defined in my previous mail,
what is the suggested approach? 

Thanks,
-Sreedhar

-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 12, 2004 6:35 PM
To: Lucene Users List
Subject: Re: Multisearcher question


Hello Sreedhar,

This is the expected behaviour.  The query is run against each index,
and it won't have any matches in either index, because neither index
has both fields.

Otis

--- Sreedhar, Dantam [EMAIL PROTECTED] wrote:

 Hi,
 
 Index side information:
 
 No. of indexes: Two (to explain better I call these as index_a and
 index_b).
 
 Fields in index_a: x and y.
 Fields in index_b: y and z.
 
 I have written a multisearch code like this.
 
 Searcher search_a = new IndexSearcher(LOCATION_OF_INDEX_A);
 Searcher search_b = new IndexSearcher(LOCATION_OF_INDEX_B);
 Searcher[] searcher = new Searcher[2];
 searcher[0] = search_a;
 searcher[1] = search_b;
 MultiSearcher searcher = new MultiSearcher(searcher);
 
 I am getting the following results,
 
 x:query  - WORKS
 x:query AND y:query - WORKS
 x:query AND z:query - DOESN'T WORK
 
 Is this expected behavior?
 
 My question is, Can MultiSearcher be used to search on indexes with
 different fields? If yes, could you please correct the above code.
 
 Thanks,
 -Sreedhar
 
 
 -
 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]


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



Re: Multisearcher question

2004-10-12 Thread Terry Steichen
I think what Sreedhar is asking for is the capability to form a join across multiple 
indices - and if so, I could sure use that capability myself.  However, I think 
Lucene's logic focuses only on a single query, so I doubt if that's easily done.

  - Original Message - 
  From: Otis Gospodnetic 
  To: Lucene Users List 
  Sent: Tuesday, October 12, 2004 9:04 AM
  Subject: Re: Multisearcher question


  Hello Sreedhar,

  This is the expected behaviour.  The query is run against each index,
  and it won't have any matches in either index, because neither index
  has both fields.

  Otis

  --- Sreedhar, Dantam [EMAIL PROTECTED] wrote:

   Hi,
   
   Index side information:
   
   No. of indexes: Two (to explain better I call these as index_a and
   index_b).
   
   Fields in index_a: x and y.
   Fields in index_b: y and z.
   
   I have written a multisearch code like this.
   
   Searcher search_a = new IndexSearcher(LOCATION_OF_INDEX_A);
   Searcher search_b = new IndexSearcher(LOCATION_OF_INDEX_B);
   Searcher[] searcher = new Searcher[2];
   searcher[0] = search_a;
   searcher[1] = search_b;
   MultiSearcher searcher = new MultiSearcher(searcher);
   
   I am getting the following results,
   
   x:query  - WORKS
   x:query AND y:query - WORKS
   x:query AND z:query - DOESN'T WORK
   
   Is this expected behavior?
   
   My question is, Can MultiSearcher be used to search on indexes with
   different fields? If yes, could you please correct the above code.
   
   Thanks,
   -Sreedhar
   
   
   -
   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]