I have never seen any recommendations regarding what is better to use, repositories or *Operations bean(template is an implementation), using Spring Data Projects, and, in particular, Spring Data ES.
Spring Data Repositories let you write basic CRUD functionality fast giving the benefit of less boilerplate and faster development though under the hood it still uses some type of *Operations bean(which is implemented by a respective template), but if you try to do something advanced you might just run into the problems.
It's not quite true for Spring Data JPA for instance as this is one of the oldest projects and has rich support for a lot of advanced things to be done using repositories(not all though).
Spring Data ES project, on the other hand, not so much(currently). You might struggle writing some advanced queries or straight won't be able to do that.
It's really a matter of preference. I use both depending on what I do. In your case, I would use a repository to index cause it's just a simple create.
IndexCoordinatesobject. You would use the latter if you want to specify a different index than the one define in the@Documentannotation.ElasticsearchRestTemplateclass I can see only one index method which requires theIndexCoordinates. No similar method inElasticsearchOperationsas well, and most methods are marked as deprecated. Couldn't find in the documentation as well: docs.spring.io/spring-data/elasticsearch/docs/current/api/org/… Am I missing something?DocumentOperationsandSearchOperations. There all the methods are defined.ElasticsearchOperationsderives from these two interfaces.ElasticsearchRestTemplateis the concrete implementation, but it derives fromAbstractElasticsearchOperationswhere all the logi is omplemented that is independent of the concrete client implementation. So have aElasticsearchOperationsinjected and use that.