title: How to best search against a DB with Lucene?
body: <p>I am looking into mechanisms for better search capabilities against our database.  It is currently a huge bottleneck (causing long-lasting queries that are hurting our database performance).</p>
  
  <p>My boss wanted me to look into <a href="http://lucene.apache.org/solr/" rel="nofollow noreferrer">Solr</a>, but on closer inspection, it seems we actually want some kind of DB integration mechanism with Lucene itself.</p>
  
  <p>From the <a href="http://wiki.apache.org/lucene-java/LuceneFAQ#head-109358021acbfc89456e446740dc2bbf9049950f" rel="nofollow noreferrer">Lucene FAQ</a>, they recommend <a href="http://search.hibernate.org/" rel="nofollow noreferrer">Hibernate Search</a>, <a href="http://www.compass-project.org/" rel="nofollow noreferrer">Compass</a>, and <strike><a href="http://www.dbsight.net/" rel="nofollow noreferrer">DBSight</a></strike>.</p>
  
  <p>As a background of our current technology stack, we are using straight JSPs on Tomcat, no Hibernate, no other frameworks on top of it... just straight Java, JSP, and JDBC against a DB2 database.</p>
  
  <p>Given that, it seems Hibernate Search might be a bit more difficult to integrate into our system, though it might be nice to have the option of using Hibernate after such an integration.</p>
  
  <p>Does anyone have any experiences they can share with using one of these tools (or other similar Lucene based solutions) that might help in picking the right tool?</p>
  
  <p>It needs to be a FOSS solution, and ideally will manage updating Lucene with changes from the database automagicly (though efficiently), without extra effort to notify the tool when changes have been made (otherwise, it seems rolling my own Lucene solution would be just as good).  Also, we have multiple application servers with just 1 database (+failover), so it would be nice if it is easy to use the solution from all application servers seamlessly.</p>
  
  <p>I am continuing to inspect the options now, but it would be really helpful to utilize other people's experiences.</p>