From c2e9b7654d2e2b160d1b18e0ecd84b354c093111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Montalv=C3=A3o=20Marques?= <9379664+gonmmarques@users.noreply.github.com> Date: Wed, 1 Nov 2023 15:57:40 +0000 Subject: [PATCH 1/2] docs: Fix typos in documentation --- .../antora/modules/ROOT/pages/elasticsearch/template.adoc | 4 ++-- .../ROOT/pages/migration-guides/migration-guide-5.0-5.1.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc index 5d52b68f9..b422a8689 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc @@ -125,7 +125,7 @@ Almost all of the methods defined in the `SearchOperations` and `ReactiveSearchO === CriteriaQuery `CriteriaQuery` based queries allow the creation of queries to search for data without knowing the syntax or basics of Elasticsearch queries. -They allow the user to build queries by simply chaining and combining `Criteria` objects that specifiy the criteria the searched documents must fulfill. +They allow the user to build queries by simply chaining and combining `Criteria` objects that specify the criteria the searched documents must fulfill. NOTE: when talking about AND or OR when combining criteria keep in mind, that in Elasticsearch AND are converted to a **must** condition and OR to a **should** @@ -213,7 +213,7 @@ Using `StringQuery` may be appropriate if you already have an Elasticsearch quer `NativeQuery` is the class to use when you have a complex query, or a query that cannot be expressed by using the `Criteria` API, for example when building queries and using aggregates. It allows to use all the different `co.elastic.clients.elasticsearch._types.query_dsl.Query` implementations from the Elasticsearch library therefore named "native". -The following code shows how to search for persons with a given firstname and for the found documents have a terms aggregation that counts the number of occurences of the lastnames for these persons: +The following code shows how to search for persons with a given `firstname` and for the found documents have a terms aggregation that counts the number of occurrences of the `lastnames` for these persons: ==== [source,java] diff --git a/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.0-5.1.adoc b/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.0-5.1.adoc index 1ec6fe291..5ad1b3696 100644 --- a/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.0-5.1.adoc +++ b/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.0-5.1.adoc @@ -24,4 +24,4 @@ Adaptions are necessary when this enum was used at other places than as a proper The functions in the `IndexOperations` and `ReactiverIndexOperations` to manage index templates that were introduced in Spring Data Elasticsearch 4.1 have been deprecated. They were using the old Elasticsearch API that was deprecated in Elasticsearch version 7.8. -Please use the new functions that are based on the compsable index template API instead. +Please use the new functions that are based on the composable index template API instead. From 5e568f0742a087e0e088f0cbc8b59926f157ed79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Montalv=C3=A3o=20Marques?= <9379664+gonmmarques@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:51:50 +0000 Subject: [PATCH 2/2] docs: Address PR remarks --- .../antora/modules/ROOT/pages/elasticsearch/template.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc index b422a8689..b893bb1a1 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc @@ -213,14 +213,14 @@ Using `StringQuery` may be appropriate if you already have an Elasticsearch quer `NativeQuery` is the class to use when you have a complex query, or a query that cannot be expressed by using the `Criteria` API, for example when building queries and using aggregates. It allows to use all the different `co.elastic.clients.elasticsearch._types.query_dsl.Query` implementations from the Elasticsearch library therefore named "native". -The following code shows how to search for persons with a given `firstname` and for the found documents have a terms aggregation that counts the number of occurrences of the `lastnames` for these persons: +The following code shows how to search for persons with a given `firstName` and for the found documents have a terms aggregation that counts the number of occurrences of the `lastName` for these persons: ==== [source,java] ---- Query query = NativeQuery.builder() .withAggregation("lastNames", Aggregation.of(a -> a - .terms(ta -> ta.field("last-name").size(10)))) + .terms(ta -> ta.field("lastName").size(10)))) .withQuery(q -> q .match(m -> m .field("firstName") @@ -234,7 +234,7 @@ SearchHits searchHits = operations.search(query, Person.class); ---- ==== -[[elasticsearch.operations.searchtemplateScOp§query]] +[[elasticsearch.operations.searchtemplatequery]] === SearchTemplateQuery This is a special implementation of the `Query` interface to be used in combination with a stored search template.