Class Hits

    • Constructor Detail

      • Hits

        public Hits()
    • Method Detail

      • setFound

        public void setFound​(Long found)

        The total number of documents that match the search request.

        Parameters:
        found - The total number of documents that match the search request.
      • getFound

        public Long getFound()

        The total number of documents that match the search request.

        Returns:
        The total number of documents that match the search request.
      • withFound

        public Hits withFound​(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.
      • setStart

        public void setStart​(Long start)

        The index of the first matching document.

        Parameters:
        start - The index of the first matching document.
      • getStart

        public Long getStart()

        The index of the first matching document.

        Returns:
        The index of the first matching document.
      • withStart

        public Hits withStart​(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.
      • setCursor

        public void setCursor​(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.
      • getCursor

        public String getCursor()

        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:
        A cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.
      • withCursor

        public Hits withCursor​(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.
      • getHit

        public List<Hit> getHit()

        A document that matches the search request.

        Returns:
        A document that matches the search request.
      • setHit

        public void setHit​(Collection<Hit> hit)

        A document that matches the search request.

        Parameters:
        hit - A document that matches the search request.
      • withHit

        public Hits withHit​(Hit... hit)

        A document that matches the search request.

        NOTE: This method appends the values to the existing list (if any). Use setHit(java.util.Collection) or withHit(java.util.Collection) if you want to override the existing values.

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

        public Hits withHit​(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.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object