Class SimpleSearchResult<H>

java.lang.Object
org.hibernate.search.engine.search.query.spi.SimpleSearchResult<H>
All Implemented Interfaces:
SearchResult<H>

public class SimpleSearchResult<H> extends Object implements SearchResult<H>
  • Constructor Details

  • Method Details

    • total

      public SearchResultTotal total()
      Specified by:
      total in interface SearchResult<H>
      Returns:
      The total for a search result, pertaining to all matched documents, independently from the offset/limit used when fetching hits. Includes in particular the total hit count.
    • hits

      public List<H> hits()
      Specified by:
      hits in interface SearchResult<H>
      Returns:
      The hits as a List containing one element for each matched entity.
    • aggregation

      public <T> T aggregation(AggregationKey<T> key)
      Specified by:
      aggregation in interface SearchResult<H>
      Type Parameters:
      T - 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.
    • took

      public Duration took()
      Specified by:
      took in interface SearchResult<H>
      Returns:
      the time taken to process the request, as a Duration
    • timedOut

      public boolean timedOut()
      Specified by:
      timedOut in interface SearchResult<H>
      Returns:
      whether or not a timeout occurred processing the request.
    • toString

      public String toString()
      Overrides:
      toString in class Object