I have a spring boot 2.2.5 application and planning to use AWS elasticsearch which is at 7.4 version. Can somebody guide me on whether to use Spring-data-elasticsearch or elasticsearch library ? I saw some posts on SO which talk about this but they are pretty old and talk of restHighLevel client not being supported which is not the case now in spring-data-elasticsearch 4.x.
Also from whatever reading I did, the only advantage of using spring-data seems to be that it's easier to convert between java POJOs and db entities. And some template methods like findBy etc. But We are planning to use more complex queries like query_string with wildcard and regex etc. I couldn't find if spring-data provides support for these.
Is there anything else that I am missing where spring-data shines over ES libraries ? What do people usually use to connect to aws ES from spring boot ? Any help is appreciated.
0
votes
1 Answers
0
votes
I would use Spring-data-elastic search. It comes with all the benefits of the benefits of the elastic search library plus some autoconfiguration (which is nice)
There are tons of methods that can be use use by regenerating queries like findById() or you can create your own by simply expanding one those.