Class SimpleSearchScrollResult<H>

All Implemented Interfaces:

public class SimpleSearchScrollResult<H> extends Object implements SearchScrollResult<H>
  • Constructor Details

  • Method Details

    • total

      public SearchResultTotal total()
      Specified by:
      total in interface SearchScrollResult<H>
      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: SearchScrollResult
      Returns true if this scrolling result contains some index hits.

      Notice that it is possible for this method to return true while SearchScrollResult.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:
      hasHits in interface SearchScrollResult<H>
      if there are still some index result hits.
    • hits

      public List<H> hits()
      Specified by:
      hits in interface SearchScrollResult<H>
      The hits of this scrolling result as a List containing one element for each matched entity.
    • took

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

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