public static class CompletionSuggestion.Entry.Option extends Suggest.Suggestion.Entry.Option
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsCOLLATE_MATCH, HIGHLIGHTED, SCORE, TEXTEMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
Option() |
|
Option(Text text,
float score,
BytesReference payload) |
| Modifier and Type | Method and Description |
|---|---|
BytesReference |
getPayload() |
double |
getPayloadAsDouble() |
long |
getPayloadAsLong() |
java.util.Map<java.lang.String,java.lang.Object> |
getPayloadAsMap() |
java.lang.String |
getPayloadAsString() |
protected XContentBuilder |
innerToXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
void |
setPayload(BytesReference payload) |
void |
setScore(float score) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
collateMatch, equals, fromXContent, getHighlighted, getScore, getText, hashCode, mergeInto, toXContentclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic Option(Text text, float score, BytesReference payload)
protected Option()
public void setPayload(BytesReference payload)
public BytesReference getPayload()
public java.lang.String getPayloadAsString()
public long getPayloadAsLong()
public double getPayloadAsDouble()
public java.util.Map<java.lang.String,java.lang.Object> getPayloadAsMap()
public void setScore(float score)
setScore in class Suggest.Suggestion.Entry.Optionprotected XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
innerToXContent in class Suggest.Suggestion.Entry.Optionjava.io.IOExceptionpublic void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class Suggest.Suggestion.Entry.Optionjava.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in class Suggest.Suggestion.Entry.Optionjava.io.IOException