I'm new to Elastic search. We are building a Spring boot application with Elastic search.
For integrating my Spring boot application either we can use elasticsearch-rest-high-level-client
or spring-boot-starter-data-elasticsearch
.
Can anyone please elaborate on which option would be overall better and why?
spring-boot-starter-data-elasticsearch
internally can use the transport(soon to be deprecated in ES 8.X)
or rest-high-level-client
Please refer elasticsearch client section for more information and how to configure them.
And from the same link:
Spring data Elasticsearch operates upon an Elasticsearch client that is connected to a single Elasticsearch node or a cluster. Although the Elasticsearch Client can be used to work with the cluster, applications using Spring Data Elasticsearch normally use the higher level abstractions of Elasticsearch Operations and Elasticsearch Repositories.
Bottom line is that you can directly use rest-high-level
client in your spring boot application but if you want more abstraction then you can use the spring-boot-starter-data-elasticsearch
dependency and use its method which provides more abstraction although internally it would use the client offered by Elasticsearch.
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.