The difference between ElasticsearchTemplate and Resthighlevelclient

1.2k Views Asked by At

I used to use ElasticsearchTemplateto query ES.Recently I found a new component Resthighlevelclient can also query ES.Can anyone tell me the difference between the two and how to choose?

1

There are 1 best solutions below

2
On
  1. ElasticsearchTemplate is now deprecated and ElasticSearchRestTemplate is recommended.

enter image description here

  1. ElasticSearchRestTemplate is built on the top of RestHighLevelClient. You can think of it as a Spring wrapper over RestHighLevelClient.

enter image description here