Update documentation.

Original Pull Request #2400
Closes #2404
This commit is contained in:
Hao 2022-12-23 21:19:28 +08:00 committed by GitHub
parent 2ea568d2e4
commit bc7667fdbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -224,11 +224,11 @@ The following code shows as an example how to retrieve all entries that have a _
SearchHits<Statement> 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();

View File

@ -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]

View File

@ -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 <<elasticsearch.mapping.meta-model.annotations>>).
.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);
----
====

View File

@ -37,7 +37,7 @@ public class Person {
[source,java]
----
ReactiveELasticsearchOperations operations; <.>
ReactiveElasticsearchOperations operations;
// ...