Interface SearchResult<H>
-
- Type Parameters:
H- The type of hits.
- All Known Implementing Classes:
SimpleSearchResult
public interface SearchResult<H>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description <A> Aaggregation(AggregationKey<A> key)default <A> AgetAggregation(AggregationKey<A> key)Deprecated.Useaggregation(AggregationKey)instead.default List<H>getHits()Deprecated.Usehits()instead.default DurationgetTook()Deprecated.Usetook()instead.default longgetTotalHitCount()Deprecated.UsetotalHitCount()instead.List<H>hits()default booleanisTimedOut()Deprecated.UsetimedOut()instead.booleantimedOut()Durationtook()longtotalHitCount()
-
-
-
Method Detail
-
totalHitCount
long totalHitCount()
- Returns:
- The total number of matching entities, ignoring pagination settings.
-
getTotalHitCount
@Deprecated default long getTotalHitCount()
Deprecated.UsetotalHitCount()instead.- Returns:
- The total number of matching entities, ignoring pagination settings.
-
getHits
@Deprecated default List<H> getHits()
Deprecated.Usehits()instead.- Returns:
- The hits as a
Listcontaining one element for each matched entity.
-
aggregation
<A> A aggregation(AggregationKey<A> key)
- Type Parameters:
A- The type of result for this aggregation.- Parameters:
key- The key previously used to register the aggregation during query building.- Returns:
- The result for the given aggregation.
- Throws:
SearchException- If the given key was never registered while building this query, and is thus not mapped to anything.
-
getAggregation
@Deprecated default <A> A getAggregation(AggregationKey<A> key)
Deprecated.Useaggregation(AggregationKey)instead.- Type Parameters:
A- The type of result for this aggregation.- Parameters:
key- The key previously used to register the aggregation during query building.- Returns:
- The result for the given aggregation.
- Throws:
SearchException- If the given key was never registered while building this query, and is thus not mapped to anything.
-
getTook
@Deprecated default Duration getTook()
Deprecated.Usetook()instead.- Returns:
- the time taken to process the request, as a
Duration
-
timedOut
boolean timedOut()
- Returns:
- whether or not a timeout occurred processing the request.
-
isTimedOut
@Deprecated default boolean isTimedOut()
Deprecated.UsetimedOut()instead.- Returns:
- whether or not a timeout occurred processing the request.
-
-