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