Class SuggestModel
- java.lang.Object
-
- com.amazonaws.services.cloudsearchdomain.model.SuggestModel
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class SuggestModel extends Object implements Serializable, Cloneable
Container for the suggestion information returned in a
SuggestResponse
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SuggestModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SuggestModel
clone()
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(SuggestionMatch... suggestions)
The documents that match the query string.SuggestModel
withSuggestions(Collection<SuggestionMatch> suggestions)
The documents that match the query string.
-
-
-
Method Detail
-
setQuery
public void setQuery(String query)
The query string specified in the suggest request.
- Parameters:
query
- The query string specified in the suggest request.
-
getQuery
public String getQuery()
The query string specified in the suggest request.
- Returns:
- The query string specified in the suggest request.
-
withQuery
public SuggestModel withQuery(String query)
The query string specified in the suggest request.
- Parameters:
query
- The query string specified in the suggest request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setFound
public void setFound(Long found)
The number of documents that were found to match the query string.
- Parameters:
found
- The number of documents that were found to match the query string.
-
getFound
public Long getFound()
The number of documents that were found to match the query string.
- Returns:
- The number of documents that were found to match the query string.
-
withFound
public SuggestModel withFound(Long found)
The number of documents that were found to match the query string.
- Parameters:
found
- The number of documents that were found to match the query string.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSuggestions
public List<SuggestionMatch> getSuggestions()
The documents that match the query string.
- Returns:
- The documents that match the query string.
-
setSuggestions
public void setSuggestions(Collection<SuggestionMatch> suggestions)
The documents that match the query string.
- Parameters:
suggestions
- The documents that match the query string.
-
withSuggestions
public SuggestModel withSuggestions(SuggestionMatch... suggestions)
The documents that match the query string.
NOTE: This method appends the values to the existing list (if any). Use
setSuggestions(java.util.Collection)
orwithSuggestions(java.util.Collection)
if you want to override the existing values.- Parameters:
suggestions
- The documents that match the query string.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSuggestions
public SuggestModel withSuggestions(Collection<SuggestionMatch> suggestions)
The documents that match the query string.
- Parameters:
suggestions
- The documents that match the query string.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public SuggestModel clone()
-
-