From 21ade25fbb905f129088fc7398adb0f9dbfe093a Mon Sep 17 00:00:00 2001 From: JBodkin <45513568+JBodkin@users.noreply.github.com> Date: Sun, 26 Apr 2020 16:40:30 +0100 Subject: [PATCH] DATAES-802 - Update documentation for using scroll API with repository methods. Original PR: #440 --- src/main/asciidoc/reference/elasticsearch-misc.adoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/asciidoc/reference/elasticsearch-misc.adoc b/src/main/asciidoc/reference/elasticsearch-misc.adoc index 41527cbed..b4bcbbc1a 100644 --- a/src/main/asciidoc/reference/elasticsearch-misc.adoc +++ b/src/main/asciidoc/reference/elasticsearch-misc.adoc @@ -80,6 +80,17 @@ while (scroll.hasSearchHits()) { template.searchScrollClear(scrollId); ---- +Additionally, the scroll API can be used by defining the return type as `Stream` in the Elasticsearch Repository. + +[source,java] +---- +interface SampleEntityRepository extends Repository { + + Stream findBy(); + +} +---- + [[elasticsearch.misc.sorts]] == Sort options