I've recently tried to include elasticsearch into one of my projects. Therefore I looked up the different possibilities to do so. It basically came down to use either a) the transport client (internal protocol cluster nodes too use to communicate = my understanding) or b) implement it all as REST HTTP calls on my own.
As b) doesn't look like a good option, and I'm used to spring data anyways I tried using spring-data-elasticsearch which was updated recently to version 3.0.0 to support es 5.5.0 which is great as the last version was very old.
Well, I tried everything but didn't manage to get it to work with my project, as this really seems to be some kind of dependency hell you get into. My project is too big, I just can't upgrade it to spring boot 2.0.0M4 which I believe would be required to support the new spring-data-elasticsearch version - right?
So, could somebody please advice on the current and preferred way for now and the future is on how to deal with elasticsearch in spring projects? Do we really have to implement the whole REST API ourselves? Am I missing something?
Here is the REST client which should be used, if there is one used, right?
This is the compatibility chart I know which is old.
Thanks!
Unfortunately there are quite a few options out there:
How about writing a small service which would be a standalone application in spring boot 2, with the newest ES dependency, and giving it a REST API compatible with your requirements for the rest of the project? You could communicate with it via RestTemplate for starters.
This way you can start breaking up your large project into smaller subprojects and eventually maybe even microservices. Also spring boot 2 has some really nice reactive options, which really come in handy for processing data.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.