Class Hits
- All Implemented Interfaces:
Serializable,Cloneable
The collection of documents that match the search request.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanA cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.getFound()The total number of documents that match the search request.getHit()A document that matches the search request.getStart()The index of the first matching document.inthashCode()voidA cursor that can be used to retrieve the next set of matching documents when you want to page through a large result set.voidThe total number of documents that match the search request.voidsetHit(Collection<Hit> hit) A document that matches the search request.voidThe index of the first matching document.toString()Returns a string representation of this object; useful for testing and debugging.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.The total number of documents that match the search request.A document that matches the search request.withHit(Collection<Hit> hit) A document that matches the search request.The index of the first matching document.
-
Constructor Details
-
Hits
public Hits()
-
-
Method Details
-
setFound
The total number of documents that match the search request.
- Parameters:
found- The total number of documents that match the search request.
-
getFound
The total number of documents that match the search request.
- Returns:
- The total number of documents that match the search request.
-
withFound
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
The index of the first matching document.
- Parameters:
start- The index of the first matching document.
-
getStart
The index of the first matching document.
- Returns:
- The index of the first matching document.
-
withStart
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
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
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
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
A document that matches the search request.
- Returns:
- A document that matches the search request.
-
setHit
A document that matches the search request.
- Parameters:
hit- A document that matches the search request.
-
withHit
A document that matches the search request.
NOTE: This method appends the values to the existing list (if any). Use
setHit(java.util.Collection)orwithHit(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
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
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-