Interface Hits.Builder

    • Method Detail

      • found

        Hits.Builder found​(Long found)

        The total number of documents that match the search request.

        Parameters:
        found - The total number of documents that match the search request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • start

        Hits.Builder start​(Long start)

        The index of the first matching document.

        Parameters:
        start - The index of the first matching document.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • cursor

        Hits.Builder cursor​(String cursor)

        A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.

        Parameters:
        cursor - A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • hit

        Hits.Builder hit​(Collection<Hit> hit)

        A document that matches the search request.

        Parameters:
        hit - A document that matches the search request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • hit

        Hits.Builder hit​(Hit... hit)

        A document that matches the search request.

        Parameters:
        hit - A document that matches the search request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • hit

        Hits.Builder hit​(Consumer<Hit.Builder>... hit)

        A document that matches the search request.

        This is a convenience method that creates an instance of the Hit.Builder avoiding the need to create one manually via Hit.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #hit(List).

        Parameters:
        hit - a consumer that will call methods on Hit.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #hit(java.util.Collection)