Hello,
the scrolling is a great feature, but is there a way to get the totalHitCount without loading all JPA-Entities? It seems to me, to only way currently is to add up all sizes of the .hits()
list.
...
.scroll(20)...
...
long totalHitCount = 0;
for ( SearchScrollResult<KauffallTE> chunk = scroll.next();
chunk.hasHits(); chunk = scroll.next() ) {
final List<KauffallTE> hits = chunk.hits();
totalHitCount += hits.size();
// do some other stuff
}