Thanks for your reply. Your idea prompts more questions:
I understand what you are saying but don't know how to implement it. How do you go about joining all rows of all the tables belonging to one person and to index them so that I can actually use "+Fname:john +County:USA" as a query? Erick Erickson wrote: > > To expand a bit on Chris's first point: Take off your DB hat and put on > your search hat <G>. It sounds like you have simply moved your database > tables into Lucene and want to search across them. My rule is that > whenever you find yourself trying to make Lucene act like a DB, you > need to pause and reflect on your design..... > > So, from your example, you select all the data relating to id 1 from > *all* your tables, and index that as a single document in Lucene. Very > simplistically, your document for ID 1 has the fields > Fname, Lname, Age, Country, and SIN. > > Your query is now very simple, > +Fname:john +County:USA > > and to get the related SIN, you iterate over your hits > and extract the SIN from each hit. > > If I understand your problem, that is <G>. > > In general, the strategy is to de-normalize your information > when you build your index.... > > Best > Erick > -- View this message in context: http://www.nabble.com/Searching-for-multiple-criteria-%28accross-2-tables%29-tp15502657p15508362.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]