Interface SearchFetchable<H>

    • Method Detail

      • fetchHits

        List<H> fetchHits​(Integer limit)
        Execute the query and return the hits as a List, limiting to limit hits.
        Parameters:
        limit - The maximum number of hits to be returned by this method. null means no limit.
        Returns:
        The query hits.
        Throws:
        SearchException - If something goes wrong while executing the query.
        SearchTimeoutException - If a failure timeout was set and was reached while executing the query.
        RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper, e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.
      • fetchHits

        List<H> fetchHits​(Integer offset,
                          Integer limit)
        Execute the query and return the hits as a List, skipping offset hits and limiting to limit hits.
        Parameters:
        offset - The number of hits to skip. null means no offset.
        limit - The maximum number of hits to be returned by this method. null means no limit.
        Returns:
        The query hits.
        Throws:
        SearchException - If something goes wrong while executing the query.
        SearchTimeoutException - If a failure timeout was set and was reached while executing the query.
        RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper, e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.
      • fetchSingleHit

        Optional<H> fetchSingleHit()
        Execute the query and return the hits as a single, optional element.
        Returns:
        The single, optional query hit.
        Throws:
        SearchException - If something goes wrong while executing the query, or the number of hits is more than one.
        SearchTimeoutException - If a failure timeout was set and was reached while executing the query.
        RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper, e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.
      • fetchTotalHitCount

        long fetchTotalHitCount()
        Execute the query and return the total hit count.
        Returns:
        The total number of matching entities, ignoring pagination settings.
        Throws:
        SearchException - If something goes wrong while executing the query.
        SearchTimeoutException - If a failure timeout was set and was reached while executing the query.