public class SearchResult extends Object implements Serializable
The result of a Search request. Contains the documents
that match the specified search criteria and any requested fields,
highlights, and facet information.
| Constructor and Description |
|---|
SearchResult() |
| Modifier and Type | Method and Description |
|---|---|
SearchResult |
addFacetsEntry(String key,
BucketInfo value)
The requested facet information.
|
SearchResult |
clearFacetsEntries()
Removes all the entries added into Facets.
|
boolean |
equals(Object obj) |
Map<String,BucketInfo> |
getFacets()
The requested facet information.
|
Hits |
getHits()
The documents that match the search criteria.
|
SearchStatus |
getStatus()
The status information returned for the search request.
|
int |
hashCode() |
void |
setFacets(Map<String,BucketInfo> facets)
The requested facet information.
|
void |
setHits(Hits hits)
The documents that match the search criteria.
|
void |
setStatus(SearchStatus status)
The status information returned for the search request.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SearchResult |
withFacets(Map<String,BucketInfo> facets)
The requested facet information.
|
SearchResult |
withHits(Hits hits)
The documents that match the search criteria.
|
SearchResult |
withStatus(SearchStatus status)
The status information returned for the search request.
|
public SearchStatus getStatus()
public void setStatus(SearchStatus status)
status - The status information returned for the search request.public SearchResult withStatus(SearchStatus status)
Returns a reference to this object so that method calls can be chained together.
status - The status information returned for the search request.public Hits getHits()
public void setHits(Hits hits)
hits - The documents that match the search criteria.public SearchResult withHits(Hits hits)
Returns a reference to this object so that method calls can be chained together.
hits - The documents that match the search criteria.public Map<String,BucketInfo> getFacets()
public void setFacets(Map<String,BucketInfo> facets)
facets - The requested facet information.public SearchResult withFacets(Map<String,BucketInfo> facets)
Returns a reference to this object so that method calls can be chained together.
facets - The requested facet information.public SearchResult addFacetsEntry(String key, BucketInfo value)
The method adds a new key-value pair into Facets parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Facets.value - The corresponding value of the entry to be added into Facets.public SearchResult clearFacetsEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString in class ObjectObject.toString()Copyright © 2015. All rights reserved.