From c8c3cb79090784cd63a9f54040e2aea17ac7ee3c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 16 Jul 2019 09:32:33 +0200 Subject: [PATCH] DATAES-497 - Polishing. Consistently add anchors to headings. Tiny syntax tweaks. Remove superfluous newlines. Original pull request: #291. --- src/main/asciidoc/preface.adoc | 1 + src/main/asciidoc/reference/elasticsearch-clients.adoc | 2 +- src/main/asciidoc/reference/elasticsearch-new.adoc | 4 ++++ .../reference/elasticsearch-object-mapping.adoc | 10 +++++----- .../asciidoc/reference/elasticsearch-operations.adoc | 3 --- .../reference/reactive-elasticsearch-repositories.adoc | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/asciidoc/preface.adoc b/src/main/asciidoc/preface.adoc index 698113052..e938f37fb 100644 --- a/src/main/asciidoc/preface.adoc +++ b/src/main/asciidoc/preface.adoc @@ -1,3 +1,4 @@ +[[preface]] = Preface The Spring Data Elasticsearch project applies core Spring concepts to the development of solutions using the Elasticsearch Search Engine. It provides: diff --git a/src/main/asciidoc/reference/elasticsearch-clients.adoc b/src/main/asciidoc/reference/elasticsearch-clients.adoc index 6ab5b1c08..1d1b8d813 100644 --- a/src/main/asciidoc/reference/elasticsearch-clients.adoc +++ b/src/main/asciidoc/reference/elasticsearch-clients.adoc @@ -123,7 +123,7 @@ Mono response = client.index(request -> .setRefreshPolicy(IMMEDIATE); ); ---- -<1> Use the builder to provide cluster addresses, set default `HttpHeaders` or enbale SSL. +<1> Use the builder to provide cluster addresses, set default `HttpHeaders` or enable SSL. ==== NOTE: The ReactiveClient response, especially for search operations, is bound to the `from` (offset) & `size` (limit) options of the request. diff --git a/src/main/asciidoc/reference/elasticsearch-new.adoc b/src/main/asciidoc/reference/elasticsearch-new.adoc index 6f6fb9521..26dc34d5d 100644 --- a/src/main/asciidoc/reference/elasticsearch-new.adoc +++ b/src/main/asciidoc/reference/elasticsearch-new.adoc @@ -1,8 +1,12 @@ +[[new-features]] = What's new +[[new-features.3-2-0]] == New in Spring Data Elasticsearch 3.2 * Secured Elasticsearch cluster support with Basic Authentication and SSL transport. * Upgrade to Elasticsearch 6.8.1. * Reactive programming support with <> and <>. * Introduction of the <> as an alternative to the Jackson `ObjectMapper`. +* Field name customization in `@Field`. +* Support for Delete by Query. diff --git a/src/main/asciidoc/reference/elasticsearch-object-mapping.adoc b/src/main/asciidoc/reference/elasticsearch-object-mapping.adoc index db9475cb8..07c619c5d 100644 --- a/src/main/asciidoc/reference/elasticsearch-object-mapping.adoc +++ b/src/main/asciidoc/reference/elasticsearch-object-mapping.adoc @@ -21,7 +21,7 @@ public class Config extends AbstractElasticsearchConfiguration { <1> @Override public RestHighLevelClient elasticsearchClient() { - return RestClients.create(ClientConfiguration.create("localhost:9200")).rest() + return RestClients.create(ClientConfiguration.create("localhost:9200")).rest(); } } ---- @@ -110,7 +110,7 @@ Those type hints are represented as `_class` attributes within the document and ==== [source,java] ---- -public class Person { <1> +public class Person { <1> @Id String id; String firstname; @@ -138,7 +138,7 @@ to already have entity information available when first reading data from the st ==== [source,java] ---- -@TypeAlias("human") <1> +@TypeAlias("human") <1> public class Person { @Id String id; @@ -148,7 +148,7 @@ public class Person { [source,json] ---- { - "_class" : "human", <1> + "_class" : "human", <1> "id" : ... } ---- @@ -254,7 +254,7 @@ public class Config extends AbstractElasticsearchConfiguration { @Override public RestHighLevelClient elasticsearchClient() { - return RestClients.create(ClientConfiguration.create("localhost:9200")).rest() + return RestClients.create(ClientConfiguration.create("localhost:9200")).rest(); } @Bean diff --git a/src/main/asciidoc/reference/elasticsearch-operations.adoc b/src/main/asciidoc/reference/elasticsearch-operations.adoc index 544b7eebf..8da4f92c0 100644 --- a/src/main/asciidoc/reference/elasticsearch-operations.adoc +++ b/src/main/asciidoc/reference/elasticsearch-operations.adoc @@ -45,7 +45,6 @@ public class TransportClientConfig extends ElasticsearchConfigurationSupport { } } ---- - <1> Setting up the <>. <2> Creating the `ElasticsearchTemplate` bean, offering both names, _elasticsearchOperations_ and _elasticsearchTemplate_. <3> Using the <> ElasticsearchMapper. @@ -84,7 +83,6 @@ public class RestClientConfig extends AbstractElasticsearchConfiguration { <1> Setting up the <>. <2> The base class `AbstractElasticsearchConfiguration` already provides the `elasticsearchTemplate` bean. <3> Using the <> ElasticsearchMapper. - ==== [[elasticsearch.operations.usage]] @@ -127,7 +125,6 @@ public class TestController { } ---- - <1> Let Spring inject the provided `ElasticsearchOperations` bean in the constructor. <2> Store some entity in the Elasticsearch cluster. <3> Retrieve the entity with a query by id. diff --git a/src/main/asciidoc/reference/reactive-elasticsearch-repositories.adoc b/src/main/asciidoc/reference/reactive-elasticsearch-repositories.adoc index 1dc41b173..d5276113d 100644 --- a/src/main/asciidoc/reference/reactive-elasticsearch-repositories.adoc +++ b/src/main/asciidoc/reference/reactive-elasticsearch-repositories.adoc @@ -4,7 +4,7 @@ Reactive Elasticsearch repository support builds on the core repository support explained in <> utilizing operations provided via <> executed by a <>. -Spring Data Elasticsearchs reactive repository support uses https://projectreactor.io/[Project Reactor] as its reactive +Spring Data Elasticsearch reactive repository support uses https://projectreactor.io/[Project Reactor] as its reactive composition library of choice. There are 3 main interfaces to be used: