public class SuggestionMatch
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
An autocomplete suggestion that matches the query string specified in a
SuggestRequest
.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
id
The document ID of the suggested document.
|
private java.lang.Long |
score
The relevance score of a suggested match.
|
private java.lang.String |
suggestion
The string that matches the query string specified in the
SuggestRequest . |
Constructor and Description |
---|
SuggestionMatch() |
Modifier and Type | Method and Description |
---|---|
SuggestionMatch |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getId()
The document ID of the suggested document.
|
java.lang.Long |
getScore()
The relevance score of a suggested match.
|
java.lang.String |
getSuggestion()
The string that matches the query string specified in the
SuggestRequest . |
int |
hashCode() |
void |
setId(java.lang.String id)
The document ID of the suggested document.
|
void |
setScore(java.lang.Long score)
The relevance score of a suggested match.
|
void |
setSuggestion(java.lang.String suggestion)
The string that matches the query string specified in the
SuggestRequest . |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SuggestionMatch |
withId(java.lang.String id)
The document ID of the suggested document.
|
SuggestionMatch |
withScore(java.lang.Long score)
The relevance score of a suggested match.
|
SuggestionMatch |
withSuggestion(java.lang.String suggestion)
The string that matches the query string specified in the
SuggestRequest . |
private java.lang.String suggestion
The string that matches the query string specified in the
SuggestRequest
.
private java.lang.Long score
The relevance score of a suggested match.
private java.lang.String id
The document ID of the suggested document.
public void setSuggestion(java.lang.String suggestion)
The string that matches the query string specified in the
SuggestRequest
.
suggestion
- The string that matches the query string specified in the
SuggestRequest
.public java.lang.String getSuggestion()
The string that matches the query string specified in the
SuggestRequest
.
SuggestRequest
.public SuggestionMatch withSuggestion(java.lang.String suggestion)
The string that matches the query string specified in the
SuggestRequest
.
suggestion
- The string that matches the query string specified in the
SuggestRequest
.public void setScore(java.lang.Long score)
The relevance score of a suggested match.
score
- The relevance score of a suggested match.public java.lang.Long getScore()
The relevance score of a suggested match.
public SuggestionMatch withScore(java.lang.Long score)
The relevance score of a suggested match.
score
- The relevance score of a suggested match.public void setId(java.lang.String id)
The document ID of the suggested document.
id
- The document ID of the suggested document.public java.lang.String getId()
The document ID of the suggested document.
public SuggestionMatch withId(java.lang.String id)
The document ID of the suggested document.
id
- The document ID of the suggested document.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 SuggestionMatch clone()
clone
in class java.lang.Object