You can get the results from the database and then create either some boolean clauses to append to your existing Lucene query if the number of results from the data base is small. If the number of results from the database is large then you can create a filter. (Assuming you have some common key field in your database and Lucene index). The downside to this approach is you have to pull the results out of the database and create a query/filter which can be timeconsuming if there are lots of results. Depending upon your data you can sometimes avoid the database lookup by indexing additional information in Lucene. Bear in mind that Lucene can index multiple values in a single field. Regards Paul I. Tom Hill <[EMAIL PROTECTED] ts.com> To java-user@lucene.apache.org 23/03/2006 19:51 cc Subject Please respond to Joins between index and database [EMAIL PROTECTED] apache.org Hi - I have an application where I'm using Lucene to index the contents of a database. That's working fine. But I have a problem where I'd like to retrieve a subset of the documents that match a search, based on a join table in the database. How do people typically handle combining the results of a Lucene based search with the results of a database search? Thanks, Tom --------------------------------------------------------------------- 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]