You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/asciidoc/reference/elasticsearch-misc.adoc
+109-5
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ The following arguments are available:
17
17
* `refreshIntervall`, defaults to _"1s"_
18
18
* `indexStoreType`, defaults to _"fs"_
19
19
20
-
21
20
It is as well possible to define https://www.elastic.co/guide/en/elasticsearch/reference/7.11/index-modules-index-sorting.html[index sorting] (check the linked Elasticsearch documentation for the possible field types and values):
22
21
23
22
====
@@ -133,9 +132,7 @@ stream.close();
133
132
----
134
133
====
135
134
136
-
There are no methods in the `SearchOperations` API to access the scroll id, if it should be necessary to access this,
137
-
the following methods of the `AbstractElasticsearchTemplate` can be used (this is the base implementation for the
138
-
different `ElasticsearchOperations` implementations):
135
+
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):
139
136
140
137
====
141
138
[source,java]
@@ -281,7 +278,7 @@ This works with every implementation of the `Query` interface.
281
278
[[elasticsearch.misc.point-in-time]]
282
279
== Point In Time (PIT) API
283
280
284
-
`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).
281
+
`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).
285
282
The following code snippet shows how to use this feature with a fictional `Person` class:
<.> Use the `putScript()` method to store a search template script
358
+
<.> The name / id of the script
359
+
<.> Scripts that are used in search templates must be in the _mustache_ language.
360
+
<.> The script source
361
+
<.> The search parameter in the script
362
+
<.> Paging request offset
363
+
<.> Paging request size
364
+
====
365
+
366
+
To use a search template in a search query, Spring Data Elasticsearch provides the `SearchTemplateQuery`, an implementation of the `org.springframework.data.elasticsearch.core.query.Query` interface.
367
+
368
+
In the following code, we will add a call using a search template query to a custom repository implementation (see
369
+
<<repositories.custom-implementations>>) as
370
+
an example how this can be integrated into a repository call.
371
+
372
+
We first define the custom repository fragment interface:
0 commit comments