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, waitisFragmentprotected 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.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface Streamablejava.io.IOExceptionprotected O newOption()
public void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface Streamablejava.io.IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionprotected 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)