Interface SearchResponsePage

All Known Implementing Classes:
SearchResponsePageImpl

public interface SearchResponsePage
  • Method Summary

    Modifier and Type
    Method
    Description
    The cursor to the last item in the returned page.
    default Boolean
    Whether the total items count exceeds the maximum limit in Elasticsearch (ES) or OpenSearch (OS).
    The cursor to the first item in the returned page.
    Total number of items that matches the query
  • Method Details

    • totalItems

      Long totalItems()
      Total number of items that matches the query
    • hasMoreTotalItems

      default Boolean hasMoreTotalItems()
      Whether the total items count exceeds the maximum limit in Elasticsearch (ES) or OpenSearch (OS).

      In ES or OS, total items are often capped by a predefined configurable limit. If the result set is greater than or equal to this, this method returns true; otherwise, it returns false.

      For RDBMS-backed searches, this is always false because there is no such limitation.

      This helps clients understand when total item counts may be incomplete due to ES or OS limits.

      Returns:
      true if the total result count exceeds the cap in ES or OS; false otherwise.
    • startCursor

      String startCursor()
      The cursor to the first item in the returned page.
    • endCursor

      String endCursor()
      The cursor to the last item in the returned page.