public static class Suggest.Suggestion.Entry<O extends Suggest.Suggestion.Entry.Option> extends java.lang.Object implements java.lang.Iterable<O>, Streamable, ToXContentObject
Modifier and Type | Class and Description |
---|---|
static class |
Suggest.Suggestion.Entry.Option
Contains the suggested text with its document frequency and score.
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected int |
length |
protected int |
offset |
protected java.util.List<O> |
options |
protected static java.lang.String |
OPTIONS |
protected Text |
text |
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
Entry() |
|
Entry(Text text,
int offset,
int length) |
Modifier and Type | Method and Description |
---|---|
void |
addOption(O option) |
protected void |
addOptions(java.util.List<O> options) |
protected static void |
declareCommonFields(ObjectParser<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>,java.lang.Void> parser) |
boolean |
equals(java.lang.Object o) |
static Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option> |
fromXContent(XContentParser parser) |
int |
getLength() |
int |
getOffset() |
java.util.List<O> |
getOptions() |
Text |
getText() |
int |
hashCode() |
java.util.Iterator<O> |
iterator() |
protected void |
merge(Suggest.Suggestion.Entry<O> other)
Merge any extra fields for this subtype.
|
protected O |
newOption() |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
protected <T extends Suggest.Suggestion.Entry<O>> |
reduce(java.util.List<T> toReduce) |
protected void |
sort(java.util.Comparator<O> comparator) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFragment
protected static final java.lang.String OPTIONS
protected Text text
protected int offset
protected int length
protected java.util.List<O extends Suggest.Suggestion.Entry.Option> options
public Entry(Text text, int offset, int length)
protected Entry()
public void addOption(O option)
protected void addOptions(java.util.List<O> options)
protected void sort(java.util.Comparator<O> comparator)
protected <T extends Suggest.Suggestion.Entry<O>> Suggest.Suggestion.Entry<O> reduce(java.util.List<T> toReduce)
protected void merge(Suggest.Suggestion.Entry<O> other)
public Text getText()
public int getOffset()
public int getLength()
public java.util.Iterator<O> iterator()
iterator
in interface java.lang.Iterable<O extends Suggest.Suggestion.Entry.Option>
public java.util.List<O> getOptions()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
protected O newOption()
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
protected static void declareCommonFields(ObjectParser<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>,java.lang.Void> parser)
public static Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option> fromXContent(XContentParser parser)