public class SuggestModel extends Object implements Serializable
Container for the suggestion information returned in a
SuggestResponse
.
Constructor and Description |
---|
SuggestModel() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Long |
getFound()
The number of documents that were found to match the query string.
|
String |
getQuery()
The query string specified in the suggest request.
|
List<SuggestionMatch> |
getSuggestions()
The documents that match the query string.
|
int |
hashCode() |
void |
setFound(Long found)
The number of documents that were found to match the query string.
|
void |
setQuery(String query)
The query string specified in the suggest request.
|
void |
setSuggestions(Collection<SuggestionMatch> suggestions)
The documents that match the query string.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SuggestModel |
withFound(Long found)
The number of documents that were found to match the query string.
|
SuggestModel |
withQuery(String query)
The query string specified in the suggest request.
|
SuggestModel |
withSuggestions(Collection<SuggestionMatch> suggestions)
The documents that match the query string.
|
SuggestModel |
withSuggestions(SuggestionMatch... suggestions)
The documents that match the query string.
|
public String getQuery()
public void setQuery(String query)
query
- The query string specified in the suggest request.public SuggestModel withQuery(String query)
Returns a reference to this object so that method calls can be chained together.
query
- The query string specified in the suggest request.public Long getFound()
public void setFound(Long found)
found
- The number of documents that were found to match the query string.public SuggestModel withFound(Long found)
Returns a reference to this object so that method calls can be chained together.
found
- The number of documents that were found to match the query string.public List<SuggestionMatch> getSuggestions()
public void setSuggestions(Collection<SuggestionMatch> suggestions)
suggestions
- The documents that match the query string.public SuggestModel withSuggestions(SuggestionMatch... suggestions)
Returns a reference to this object so that method calls can be chained together.
suggestions
- The documents that match the query string.public SuggestModel withSuggestions(Collection<SuggestionMatch> suggestions)
Returns a reference to this object so that method calls can be chained together.
suggestions
- The documents that match the query string.public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.