diff --git a/src/main/asciidoc/reference/elasticsearch-join-types.adoc b/src/main/asciidoc/reference/elasticsearch-join-types.adoc index 5c6a95348..8b4ed60b0 100644 --- a/src/main/asciidoc/reference/elasticsearch-join-types.adoc +++ b/src/main/asciidoc/reference/elasticsearch-join-types.adoc @@ -224,11 +224,11 @@ The following code shows as an example how to retrieve all entries that have a _ SearchHits hasVotes() { Query query = NativeQuery.builder() - .withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query.of(qb -> qb // + .withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query.of(qb -> qb .hasChild(hc -> hc - .queryName("vote") // - .query(matchAllQueryAsQuery()) // - .scoreMode(ChildScoreMode.None)// + .queryName("vote") + .query(matchAllQueryAsQuery()) + .scoreMode(ChildScoreMode.None) ))) .build(); diff --git a/src/main/asciidoc/reference/elasticsearch-misc.adoc b/src/main/asciidoc/reference/elasticsearch-misc.adoc index b727a09e3..d78eb4b18 100644 --- a/src/main/asciidoc/reference/elasticsearch-misc.adoc +++ b/src/main/asciidoc/reference/elasticsearch-misc.adoc @@ -135,7 +135,7 @@ stream.close(); There are no methods in the `SearchOperations` API to access the scroll id, if it should be necessary to access this, the following methods of the `AbstractElasticsearchTemplate` can be used (this is the base implementation for the -different `ElasticsearchOperations` implementations: +different `ElasticsearchOperations` implementations): ==== [source,java] @@ -281,9 +281,8 @@ This works with every implementation of the `Query` interface. [[elasticsearch.misc.point-in-time]] == Point In Time (PIT) API -`ElasticsearchOperations` supports the point in time API of Elasticsearch (see https://www.elastic -.co/guide/en/elasticsearch/reference/8.3/point-in-time-api.html). The following code snippet shows how to use this -feature with a fictional `Person` class: +`ElasticsearchOperations` supports the point in time API of Elasticsearch (see https://www.elastic.co/guide/en/elasticsearch/reference/8.3/point-in-time-api.html). +The following code snippet shows how to use this feature with a fictional `Person` class: ==== [source,java] diff --git a/src/main/asciidoc/reference/elasticsearch-operations.adoc b/src/main/asciidoc/reference/elasticsearch-operations.adoc index 90fa0182f..1ca99be93 100644 --- a/src/main/asciidoc/reference/elasticsearch-operations.adoc +++ b/src/main/asciidoc/reference/elasticsearch-operations.adoc @@ -35,6 +35,7 @@ There is support for automatic creation of indices and writing the mappings when The example shows how to use an injected `ElasticsearchOperations` instance in a Spring REST controller. The example assumes that `Person` is a class that is annotated with `@Document`, `@Id` etc (see <>). + .ElasticsearchOperations usage ==== [source,java] @@ -135,7 +136,7 @@ NOTE: when talking about AND or OR when combining criteria keep in mind, that in ==== [source,java] ---- -Criteria criteria = new Criteria("price").is(42.0); +Criteria criteria = new Criteria("price").is(42.0L); Query query = new CriteriaQuery(criteria); ---- ==== @@ -146,7 +147,7 @@ Conditions for the same field can be chained, they will be combined with a logic ==== [source,java] ---- -Criteria criteria = new Criteria("price").greaterThan(42.0).lessThan(34.0L); +Criteria criteria = new Criteria("price").greaterThan(42.0L).lessThan(34.0L); Query query = new CriteriaQuery(criteria); ---- ==== diff --git a/src/main/asciidoc/reference/reactive-elasticsearch-operations.adoc b/src/main/asciidoc/reference/reactive-elasticsearch-operations.adoc index 3e7d93111..1e7357770 100644 --- a/src/main/asciidoc/reference/reactive-elasticsearch-operations.adoc +++ b/src/main/asciidoc/reference/reactive-elasticsearch-operations.adoc @@ -37,7 +37,7 @@ public class Person { [source,java] ---- -ReactiveELasticsearchOperations operations; <.> +ReactiveElasticsearchOperations operations; // ...