上一章:《SpringBoot整合ElasticSearch实现模糊查询,批量CRUD,排序,分页,高亮》 在上一章节,我们学习到了es通过RestHighLevelClient实现最基本的增删改查的语法,在本章我们继续深入实践一下es的相关操作,在SpringBoot的相关依赖中,es已经帮我们将基本的操作都进行了封装,我们只需要掌握这些api,便可以轻松的操作我们的es 本章主角:ElasticSearchRepository,ElasticsearchRestTemplate Spring-data-elasticsearch是Spring提供的操作ElasticSearch的数据层,封装了大量的基础操作,通过它可以很方便的操作ElasticSearch的数据。 对于相关的依赖以及配置请参考第四章信息 5.1 ElasticSearchRepository的基本使用 @NoRepositoryBean public interface ElasticsearchRepository<T, ID extends Serializable> extends...