public class Suggest extends java.lang.Object implements java.lang.Iterable<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>>, Streamable, ToXContent
| Modifier and Type | Class and Description |
|---|---|
static class |
Suggest.Suggestion<T extends Suggest.Suggestion.Entry>
The suggestion responses corresponding with the suggestions in the request.
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<Suggest.Suggestion.Entry.Option> |
COMPARATOR |
static java.lang.String |
NAME |
EMPTY_PARAMS| Constructor and Description |
|---|
Suggest(java.util.List<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> suggestions) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Suggest.Suggestion> |
filter(java.lang.Class<T> suggestionType) |
static Suggest |
fromXContent(XContentParser parser)
this parsing method assumes that the leading "suggest" field name has already been parsed by the caller
|
<T extends Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> |
getSuggestion(java.lang.String name) |
boolean |
hasScoreDocs()
Whether any suggestions had query hits
|
java.util.Iterator<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> |
iterator() |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
static Suggest |
readSuggest(StreamInput in) |
static java.util.List<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> |
reduce(java.util.Map<java.lang.String,java.util.List<Suggest.Suggestion>> groupedSuggestions) |
int |
size()
The number of suggestions in this
Suggest result |
XContentBuilder |
toInnerXContent(XContentBuilder builder,
ToXContent.Params params)
use to write suggestion entries without
NAME object |
java.lang.String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFragmentpublic static final java.lang.String NAME
public static final java.util.Comparator<Suggest.Suggestion.Entry.Option> COMPARATOR
public Suggest(java.util.List<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> suggestions)
public java.util.Iterator<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> iterator()
iterator in interface java.lang.Iterable<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>>public int size()
Suggest resultpublic <T extends Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> T getSuggestion(java.lang.String name)
public boolean hasScoreDocs()
public void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface Streamablejava.io.IOExceptionpublic 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.IOExceptionpublic XContentBuilder toInnerXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
NAME objectjava.io.IOExceptionpublic static Suggest fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic static Suggest readSuggest(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic static java.util.List<Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>>> reduce(java.util.Map<java.lang.String,java.util.List<Suggest.Suggestion>> groupedSuggestions)
public <T extends Suggest.Suggestion> java.util.List<T> filter(java.lang.Class<T> suggestionType)
suggestionType contained in this Suggest instancepublic java.lang.String toString()
toString in class java.lang.Object