public class SearchResult
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
The result of a Search
request. Contains the documents that
match the specified search criteria and any requested fields, highlights, and
facet information.
Modifier and Type | Field and Description |
---|---|
private SdkInternalMap<java.lang.String,BucketInfo> |
facets
The requested facet information.
|
private Hits |
hits
The documents that match the search criteria.
|
private SdkInternalMap<java.lang.String,FieldStats> |
stats
The requested field statistics information.
|
private SearchStatus |
status
The status information returned for the search request.
|
Constructor and Description |
---|
SearchResult() |
Modifier and Type | Method and Description |
---|---|
SearchResult |
addFacetsEntry(java.lang.String key,
BucketInfo value) |
SearchResult |
addStatsEntry(java.lang.String key,
FieldStats value) |
SearchResult |
clearFacetsEntries()
Removes all the entries added into Facets.
|
SearchResult |
clearStatsEntries()
Removes all the entries added into Stats.
|
SearchResult |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,BucketInfo> |
getFacets()
The requested facet information.
|
Hits |
getHits()
The documents that match the search criteria.
|
java.util.Map<java.lang.String,FieldStats> |
getStats()
The requested field statistics information.
|
SearchStatus |
getStatus()
The status information returned for the search request.
|
int |
hashCode() |
void |
setFacets(java.util.Map<java.lang.String,BucketInfo> facets)
The requested facet information.
|
void |
setHits(Hits hits)
The documents that match the search criteria.
|
void |
setStats(java.util.Map<java.lang.String,FieldStats> stats)
The requested field statistics information.
|
void |
setStatus(SearchStatus status)
The status information returned for the search request.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SearchResult |
withFacets(java.util.Map<java.lang.String,BucketInfo> facets)
The requested facet information.
|
SearchResult |
withHits(Hits hits)
The documents that match the search criteria.
|
SearchResult |
withStats(java.util.Map<java.lang.String,FieldStats> stats)
The requested field statistics information.
|
SearchResult |
withStatus(SearchStatus status)
The status information returned for the search request.
|
private SearchStatus status
The status information returned for the search request.
private Hits hits
The documents that match the search criteria.
private SdkInternalMap<java.lang.String,BucketInfo> facets
The requested facet information.
private SdkInternalMap<java.lang.String,FieldStats> stats
The requested field statistics information.
public void setStatus(SearchStatus status)
The status information returned for the search request.
status
- The status information returned for the search request.public SearchStatus getStatus()
The status information returned for the search request.
public SearchResult withStatus(SearchStatus status)
The status information returned for the search request.
status
- The status information returned for the search request.public void setHits(Hits hits)
The documents that match the search criteria.
hits
- The documents that match the search criteria.public Hits getHits()
The documents that match the search criteria.
public SearchResult withHits(Hits hits)
The documents that match the search criteria.
hits
- The documents that match the search criteria.public java.util.Map<java.lang.String,BucketInfo> getFacets()
The requested facet information.
public void setFacets(java.util.Map<java.lang.String,BucketInfo> facets)
The requested facet information.
facets
- The requested facet information.public SearchResult withFacets(java.util.Map<java.lang.String,BucketInfo> facets)
The requested facet information.
facets
- The requested facet information.public SearchResult addFacetsEntry(java.lang.String key, BucketInfo value)
public SearchResult clearFacetsEntries()
public java.util.Map<java.lang.String,FieldStats> getStats()
The requested field statistics information.
public void setStats(java.util.Map<java.lang.String,FieldStats> stats)
The requested field statistics information.
stats
- The requested field statistics information.public SearchResult withStats(java.util.Map<java.lang.String,FieldStats> stats)
The requested field statistics information.
stats
- The requested field statistics information.public SearchResult addStatsEntry(java.lang.String key, FieldStats value)
public SearchResult clearStatsEntries()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public SearchResult clone()
clone
in class java.lang.Object