Skip to content

Commit a7185b1

Browse files
authored
Fix some typos in scripted and runtime fields doc.
Original Pull Request: #2665 Closes: #2664
1 parent 034bea6 commit a7185b1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main/asciidoc/reference/elasticsearch-misc-scripted-and-runtime-fields.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Please refer to the Elasticsearch documentation about scripting (https://www.ela
66
In the context of Spring Data Elasticsearch you can use
77

88
* scripted fields that are used to return fields that are calculated on the result documents and added to the returned document.
9-
* runtime fields that are calculated on the stored documents and can be used in a query and/or be returned in the search result.
9+
* runtime fields that are calculated on the stored documents and can be used in a query and/or be returned in the search result.
1010

11-
The following code snippets will show what you can do (this show imperative code, but the reactive implementation works similar).
11+
The following code snippets will show what you can do (these show imperative code, but the reactive implementation works similar).
1212

1313
== The person entity
1414

@@ -62,7 +62,7 @@ public record Person(
6262
----
6363
6464
<.> the `age` property will be calculated and filled in search results.
65-
<.> a convenience constructor to set up the test data
65+
<.> a convenience constructor to set up the test data.
6666
====
6767

6868
Note that the `age` property is annotated with `@ScriptedField`.
@@ -87,7 +87,7 @@ public interface PersonRepository extends ElasticsearchRepository<Person, String
8787

8888
== The service class
8989

90-
The service class has a repository injected and an `ElasticsearchOperations` instance to show several ways of poplauting and using the `age` property.
90+
The service class has a repository injected and an `ElasticsearchOperations` instance to show several ways of populating and using the `age` property.
9191
We show the code split up in different pieces to put the explanations in
9292

9393
====
@@ -137,8 +137,8 @@ public class PersonService {
137137

138138
=== Scripted fields
139139

140-
The next piece show how to use a scripted field to calculate and return the age of the persons.
141-
Scripted fields can only add something to the returned data, the age cannot be used in the query (see runtime fields for that).)
140+
The next piece shows how to use a scripted field to calculate and return the age of the persons.
141+
Scripted fields can only add something to the returned data, the age cannot be used in the query (see runtime fields for that).
142142

143143
====
144144
[source,java]
@@ -212,12 +212,12 @@ In the following code this is used to run a query for a given gender and maximum
212212
}
213213
----
214214
215-
<.> define the runtime field that caclulates the // see https://asciidoctor.org/docs/user-manual/#builtin-attributes for builtin attributes.
215+
<.> define the runtime field that calculates the age of a person. // see https://asciidoctor.org/docs/user-manual/#builtin-attributes for builtin attributes.
216216
<.> when using `Query`, add the runtime field.
217217
<.> when adding a scripted field to a `Query`, an additional field parameter is needed to have the calculated value returned.
218218
<.> when adding a scripted field to a `Query`, an additional source filter is needed to also retrieve the _normal_ fields from the document source.
219219
<.> get the data filtered with the query and where the returned entites have the age property set.
220220
<.> when using the repository, all that needs to be done is adding the runtime field as method parameter.
221221
====
222222

223-
In addition to define a runtime fields on a query, they can also be defined in the index by setting the `runtimeFIeldPath` property of the `@Mapping` annotation to point to a JSON file that contains the runtime field definitions.
223+
In addition to define a runtime fields on a query, they can also be defined in the index by setting the `runtimeFieldsPath` property of the `@Mapping` annotation to point to a JSON file that contains the runtime field definitions.

0 commit comments

Comments
 (0)