I use Hibernate and Hibernate search in my latest project on top of an existing database (MySQL). Once I perform updates through hibernate the Lucene indexes will get automatically updated.
However this database is accessed by other applications as well which don't use hibernate (they access the database directly).
What's the best approach to keep my Lucene indexes up-to date and trigger Lucene updates for every update/delete on the database?
I was planning to use database triggers to detect changes and run a custom 'scheduler' to process (fullTextSession.index(Object)) the found updates (
much like this).
Since I didn't found much on this subject and others must have run into the same problem I hope you can give me some advice/recommendations or point me into the right direction.
Thanks in advance