What you should do is denorm the 1:m relationships.

Don't try to mimic the database. If you need to, you can keep the original 2
indexes and create a third one.

--
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes

On 6/28/07, Michael Böckling <[EMAIL PROTECTED]> wrote:

Hi folks!

I know there is a MultiSearcher for searching over multiple indices, but
my
requirement is a bit special.
I have two indices whose documents have a 1:m relationship. Most queries
will only use the primary index, but some will have to look for detailed
information in the secondary index (the index fields are of course
different).

What I plan to do:
- first get the results from the primary index
- then use the pk of the found documents and the additional search
constraints to search in the secondary index
- discard any primary results that did not match in the secondary index

Is this ok, or am I completely nuts by doing that? Is there a better
alternative?

Thanks for any clues!

Michael


--
Michael Böckling
Java Engineer
dmc digital media center GmbH
Rommelstraße 11
70376 Stuttgart (Germany)
Telefon: +49 711 601747-0
Telefax: +49 711 601747-141
E-Mail: [EMAIL PROTECTED]
Internet: www.dmc.de

Handelsregister: AG Stuttgart HRB 18974
Geschäftsführer: Andreas Magg, Daniel Rebhorn, Andreas Schwend

---------------------------------------------
Besseres E-Business.
dmc ist die kreative Vernetzung von Agentur, Systemhaus und Service. Seit
über 10 Jahren entwickeln und realisieren wir zukunftweisende und
erfolgreiche E-Business-Lösungen. Zu unseren langjährigen Kunden zählen
neckermann.de, Kodak und Telekom Training.

dmc auf Platz 8 im aktuellen New Media Service Ranking.
Als inhabergeführte und netzwerkunabhängige Agentur gehören wir mit einem
Umsatz von 13,50 Mio. Euro zu den Top 10 der erfolgreichsten New Media
Dienstleister in Deutschland.

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


Reply via email to