public static class Suggest.Suggestion.Entry<O extends Suggest.Suggestion.Entry.Option> extends Object implements Iterable<O>, Streamable, ToXContent
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 List<O> |
options |
protected Text |
text |
EMPTY_PARAMS
Constructor and Description |
---|
Suggest.Suggestion.Entry() |
Suggest.Suggestion.Entry(Text text,
int offset,
int length) |
Modifier and Type | Method and Description |
---|---|
void |
addOption(O option) |
boolean |
equals(Object o) |
int |
getLength() |
int |
getOffset() |
List<O> |
getOptions() |
Text |
getText() |
int |
hashCode() |
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) |
protected <T extends Suggest.Suggestion.Entry<O>> |
reduce(List<T> toReduce) |
protected void |
sort(Comparator<O> comparator) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
protected Text text
protected int offset
protected int length
protected List<O extends Suggest.Suggestion.Entry.Option> options
public Suggest.Suggestion.Entry(Text text, int offset, int length)
public Suggest.Suggestion.Entry()
public void addOption(O option)
protected void sort(Comparator<O> comparator)
protected <T extends Suggest.Suggestion.Entry<O>> Suggest.Suggestion.Entry<O> reduce(List<T> toReduce)
protected void merge(Suggest.Suggestion.Entry<O> other)
public Text getText()
public int getOffset()
public int getLength()
public Iterator<O> iterator()
iterator
in interface Iterable<O extends Suggest.Suggestion.Entry.Option>
public List<O> getOptions()
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
protected O newOption()
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
Copyright © 2009–2016. All rights reserved.