I would like to send data from spring boot app to elasticsearch

I would like to send data from spring boot app to elasticsearch.
Which way is better?
What use case is there?
and, i am using fluentD.

That's what I'd do as well.

Thank you for your answer.
So, is it OK to send it to flowentD from Spring Boot app using UDP?
I don't know which way is common.

I'm not a fluentd user.

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.