lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul.Illingwo...@saaconsultants.com
Subject Re: Joins between index and database
Date Fri, 24 Mar 2006 09:19:07 GMT





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                                                      
             <lucene-list@zven                                             
             ts.com>                                                    To 
                                       java-user@lucene.apache.org         
             23/03/2006 19:51                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         Joins between index and database    
             java-user@lucene.                                             
                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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org




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


Mime
View raw message