Package de.otto.flummi.response
Class ScrollingSearchHits
- java.lang.Object
-
- de.otto.flummi.response.ScrollingSearchHits
-
- All Implemented Interfaces:
SearchHits,Iterable<SearchHit>
public class ScrollingSearchHits extends Object implements SearchHits
Auto-scrolling implementation of SearchHits. Contains a page of search results and automatically fetches more pages from the server as you iterate or stream over the search result.
-
-
Field Summary
Fields Modifier and Type Field Description static de.mhus.lib.core.logging.LogLOG
-
Constructor Summary
Constructors Constructor Description ScrollingSearchHits(long totalHits, Float maxScore, String scrollId, String scroll, List<SearchHit> hitsCurrentPage, HttpClientWrapper client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforEach(Consumer<? super SearchHit> action)FloatgetMaxScore()longgetTotalHits()Iterator<SearchHit>iterator()Spliterator<SearchHit>spliterator()Stream<SearchHit>stream()
-
-
-
Method Detail
-
getTotalHits
public long getTotalHits()
- Specified by:
getTotalHitsin interfaceSearchHits
-
getMaxScore
public Float getMaxScore()
- Specified by:
getMaxScorein interfaceSearchHits- Returns:
- The maximum score of this query.
-
iterator
public Iterator<SearchHit> iterator()
- Specified by:
iteratorin interfaceIterable<SearchHit>- Specified by:
iteratorin interfaceSearchHits
-
forEach
public void forEach(Consumer<? super SearchHit> action)
- Specified by:
forEachin interfaceIterable<SearchHit>- Specified by:
forEachin interfaceSearchHits
-
spliterator
public Spliterator<SearchHit> spliterator()
- Specified by:
spliteratorin interfaceIterable<SearchHit>- Specified by:
spliteratorin interfaceSearchHits
-
stream
public Stream<SearchHit> stream()
- Specified by:
streamin interfaceSearchHits
-
-