You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by ia...@gsk.com on 2005/03/14 10:50:05 UTC

Querying multiple indexes and combining results

Hi,
I am currently evaluating a system that uses Lucene, so please excuse any 
lack of understanding.

Could somebody tell me if it is possible to query across separate indexes 
with different criteria, but then to join/merge the results.  An analogy 
is querying two separate tables then joining based on a key.

This sounds odd so I'll try and give a concrete example, it's not easy to 
explain either!  The system holds 2 conceptually different types of 
information: nodes(proteine interactors) and edges(protein interactions). 
We currently index the edges, and add all of the node information to the 
record as well.  This causes problems when we want to filter on node 
information, as we will always have more than one node in a record.  For 
example taking one edge record: if the index field "species" on one node 
is "mouse" and one is "rat", then my index record has 2 species. This is 
sometimes undesirable.

If I had an index of node information and an index of edge information, I 
could run a query which filters on node fields and edge fields; then 
combines based on a specific ID field. 

Sorry if the question is a little unclear.

Many thanks