Package de.otto.flummi.response
Class SimpleSearchHits
- java.lang.Object
-
- de.otto.flummi.response.SimpleSearchHits
-
- All Implemented Interfaces:
SearchHits,Iterable<SearchHit>
public class SimpleSearchHits extends Object implements SearchHits
Simple implementation of SearchHits. Only contains a single page of search results and does not do any automatic fetching of more pages.
-
-
Constructor Summary
Constructors Constructor Description SimpleSearchHits(long totalHits, Float maxScore, List<SearchHit> hits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforEach(Consumer<? super SearchHit> action)List<SearchHit>getHits()The hits of the search request (based on the search type, and from / size provided).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.
-
getHits
public List<SearchHit> getHits()
The hits of the search request (based on the search type, and from / size provided).
-
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
-
-