Java+elasticsearch for search feature

Hi,
It sounds out of the topic use case.
But i want to use elasticsearch for fast searching to my relational database. Can I use elasticsearch at my DB layer in java application to search data in relational database?
Please guide how can I achieve that.

BR,
Sunil.

I shared most of my thoughts there: http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.