lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tate Avery" <tate.av...@nstein.com>
Subject Relational Search
Date Tue, 04 Nov 2003 18:28:15 GMT
Hello,

I want to perform a 'relational search' meanining that I want to search 2 indexes and perform
an intersection between the 2.  It would be very much like a table join in an SQL statement
in terms of overall result.

So, I might have an index of documents of type A that would allow me to retrieve IDs.
And an index of documents of type B that would also return IDs of A type documents (like a
foreign key).

So, I want to find all documents of type A that match query X and also match query Y on the
B-type index.

Using SQL Server (with full-text search) it might be something like:

	SELECT a.name FROM index1 a, index2 b 
	WHERE CONTAINS(a.body, 'x') 
	   AND b.id = a.id AND CONTAINS(b.title, 'y')

Doing my own intersection is not desirable (since loading the IDs from both results can be
very time-consuming).
And, building a huge boolean query that performs the intersection (by loading the smaller
ID set only) is still too slow.
I don't mind doing any extra work so long as I get an reasonably efficient relational search
in the end.

Does anyone have any creative ideas for tackling this problem with Lucene?

Thank you,
Tate


p.s.  Using the Multisearcher allows for easy unions  :) ... but not intersections.

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


Mime
View raw message