public class Hits extends Object implements Serializable, Cloneable
The collection of documents that match the search request.
Constructor and Description |
---|
Hits() |
Modifier and Type | Method and Description |
---|---|
Hits |
clone() |
boolean |
equals(Object obj) |
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.
|
Long |
getFound()
The total number of documents that match the search request.
|
List<Hit> |
getHit()
A document that matches the search request.
|
Long |
getStart()
The index of the first matching document.
|
int |
hashCode() |
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.
|
void |
setFound(Long found)
The total number of documents that match the search request.
|
void |
setHit(Collection<Hit> hit)
A document that matches the search request.
|
void |
setStart(Long start)
The index of the first matching document.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
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.
|
Hits |
withFound(Long found)
The total number of documents that match the search request.
|
Hits |
withHit(Collection<Hit> hit)
A document that matches the search request.
|
Hits |
withHit(Hit... hit)
A document that matches the search request.
|
Hits |
withStart(Long start)
The index of the first matching document.
|
public Long getFound()
public void setFound(Long found)
found
- The total number of documents that match the search request.public Hits withFound(Long found)
Returns a reference to this object so that method calls can be chained together.
found
- The total number of documents that match the search request.public Long getStart()
public void setStart(Long start)
start
- The index of the first matching document.public Hits withStart(Long start)
Returns a reference to this object so that method calls can be chained together.
start
- The index of the first matching document.public String getCursor()
public void setCursor(String cursor)
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.public Hits withCursor(String cursor)
Returns a reference to this object so that method calls can be chained together.
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.public List<Hit> getHit()
public void setHit(Collection<Hit> hit)
hit
- A document that matches the search request.public Hits withHit(Hit... hit)
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.
Returns a reference to this object so that method calls can be chained together.
hit
- A document that matches the search request.public Hits withHit(Collection<Hit> hit)
Returns a reference to this object so that method calls can be chained together.
hit
- A document that matches the search request.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.