Elasticsearch Support
-
配置支持、对象映射、异常翻译和特性丰富的对象映射。
-
注解驱动的映射元数据,支持其他元数据格式和基于 Java 的查询、条件和更新 DSL。
-
Repository 支持,包括自动实现、命令式和响应式接口的支持。
-
一致的命名约定,与 DataStax Java 驱动程序保持一致。
Spring Data 对 Elasticsearch 的支持包含了广泛的功能:
Spring Data support for Elasticsearch contains a wide range of features:
-
Spring configuration support for various Elasticsearch clients.
-
The
ElasticsearchTemplate
andReactiveElasticsearchTemplate
helper classes that provide object mapping between ES index operations and POJOs. -
Exception translation into Spring’s portable Data Access Exception Hierarchy.
-
Feature rich object mapping integrated with Spring’s Conversion Service.
-
Annotation-based mapping metadata that is extensible to support other metadata formats.
-
Java-based query, criteria, and update DSLs.
-
Automatic implementation of imperative and reactive
Repository
interfaces including support for custom query methods.
对于大多数与数据相关的任务,可以使用 `[Reactive]ElasticsearchTemplate`或 `Repository`支持,两者都使用丰富的对象映射功能。Spring Data Elasticsearch 针对各个 API 中的对象采用了与 DataStax Java 驱动程序中的一致命名约定,方便理解,以便将现有知识映射到 Spring API。
For most data-oriented tasks, you can use the [Reactive]ElasticsearchTemplate
or the Repository
support, both of which use the rich object-mapping functionality.
Spring Data Elasticsearch uses consistent naming conventions on objects in various APIs to those found in the DataStax Java Driver so that they are familiar and so that you can map your existing knowledge onto the Spring APIs.