DATAES-802 - Update documentation for using scroll API with repository methods.

Original PR: #440
This commit is contained in:
JBodkin 2020-04-26 16:40:30 +01:00 committed by GitHub
parent a4ec819e7d
commit 21ade25fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<SampleEntity, String> {
Stream<SampleEntity> findBy();
}
----
[[elasticsearch.misc.sorts]]
== Sort options