Class SimpleSearchScrollResult<H>
- java.lang.Object
-
- org.hibernate.search.engine.search.query.spi.SimpleSearchScrollResult<H>
-
- All Implemented Interfaces:
SearchScrollResult<H>
public class SimpleSearchScrollResult<H> extends Object implements SearchScrollResult<H>
-
-
Constructor Summary
Constructors Constructor Description SimpleSearchScrollResult(SearchResultTotal resultTotal, boolean hasHits, List<H> hits, Duration took, Boolean timedOut)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasHits()Returns true if this scrolling result contains some index hits.List<H>hits()booleantimedOut()Durationtook()SearchResultTotaltotal()
-
-
-
Constructor Detail
-
SimpleSearchScrollResult
public SimpleSearchScrollResult(SearchResultTotal resultTotal, boolean hasHits, List<H> hits, Duration took, Boolean timedOut)
-
-
Method Detail
-
total
public SearchResultTotal total()
- Specified by:
totalin interfaceSearchScrollResult<H>- Returns:
- The total for a search result, pertaining to all matched documents,
independently from the current chunk of
SearchScrollResult.hits(). Includes in particular the total hit count.
-
hasHits
public boolean hasHits()
Description copied from interface:SearchScrollResultReturns true if this scrolling result contains some index hits.Notice that it is possible for this method to return
truewhileSearchScrollResult.hits()returns an empty list, e.g.: if matching entities could not be found in the database.This methods is mainly useful as a stop condition in loops.
- Specified by:
hasHitsin interfaceSearchScrollResult<H>- Returns:
- if there are still some index result hits.
-
hits
public List<H> hits()
- Specified by:
hitsin interfaceSearchScrollResult<H>- Returns:
- The hits of this scrolling result as a
Listcontaining one element for each matched entity.
-
took
public Duration took()
- Specified by:
tookin interfaceSearchScrollResult<H>- Returns:
- the time taken to process the request, as a
Duration
-
timedOut
public boolean timedOut()
- Specified by:
timedOutin interfaceSearchScrollResult<H>- Returns:
- whether or not a timeout occurred processing the request.
-
-