I am building a web application with a backend restful web service.
One of my tables is pretty much standalone, i.e rows only referenced from one other table in a manner where I can happily live without joins and only fetch by primary key when I need to. However this table holds a lot of rows and the searches performed against it all scream "Lucene". MySQL is unable to handle these queries with a reasonable response time.
So I would like to use Lucene for searching this table. In the past I've used Solr extensively so I'm familiar with the concepts and terminology. I was thinking that given my circumstances described above, instead of SQL-to-Lucene index synchronization, I can't see a reason why I shouldn't simply use Lucene as the canonical storage for this particular entity. Basically I would like to have a "Lucene DAO" implementation that replaces the current Hibernate DAO implementation for this particular table.
So my questions are:
Edit: I've now come across Compass which at a quick glance seems to be what I'm looking for. Does anyone have any experience with it?
Edit #2: Compass has been discontinued and replaced with ElasticSearch which isn't quite the same (service rather than a component). Hibernate Search didn't prove to be what I'm looking for either. The bottom line is that this is a valid approach, but for the time being one has to implement such a DAO themselves.
I would ditch SQL for this use case and use Lucene straight, no chaser.
Your queries with Lucene will be a lot richer: n-grams instead of LIKE.