Class PhraseSuggestion
java.lang.Object
org.elasticsearch.search.suggest.Suggest.Suggestion<PhraseSuggestion.Entry>
org.elasticsearch.search.suggest.phrase.PhraseSuggestion
- All Implemented Interfaces:
java.lang.Iterable<PhraseSuggestion.Entry>
,NamedWriteable
,Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
public class PhraseSuggestion extends Suggest.Suggestion<PhraseSuggestion.Entry>
Suggestion entry returned from the
PhraseSuggester
.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PhraseSuggestion.Entry
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE
Deprecated.Fields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
entries, name, size
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors Constructor Description PhraseSuggestion(java.lang.String name, int size)
PhraseSuggestion(StreamInput in)
-
Method Summary
Modifier and Type Method Description static PhraseSuggestion
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser, java.lang.String name)
java.lang.String
getWriteableName()
Returns the name of the writeable objectint
getWriteableType()
Returns a integer representing the type of the suggestion.protected PhraseSuggestion.Entry
newEntry(StreamInput in)
Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
addTerm, equals, fromXContent, getEntries, getName, getSize, hashCode, iterator, parseEntries, reduce, sortComparator, toXContent, trim, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
TYPE
@Deprecated public static final int TYPEDeprecated.- See Also:
- Constant Field Values
-
-
Constructor Details
-
PhraseSuggestion
public PhraseSuggestion(java.lang.String name, int size) -
PhraseSuggestion
- Throws:
java.io.IOException
-
-
Method Details
-
getWriteableName
public java.lang.String getWriteableName()Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
- Specified by:
getWriteableName
in classSuggest.Suggestion<PhraseSuggestion.Entry>
-
getWriteableType
public int getWriteableType()Description copied from class:Suggest.Suggestion
Returns a integer representing the type of the suggestion. This is used for internal serialization over the network. This class is now serialized as a NamedWriteable and this method only remains for backwards compatibility- Overrides:
getWriteableType
in classSuggest.Suggestion<PhraseSuggestion.Entry>
-
newEntry
- Specified by:
newEntry
in classSuggest.Suggestion<PhraseSuggestion.Entry>
- Throws:
java.io.IOException
-
fromXContent
public static PhraseSuggestion fromXContent(org.elasticsearch.common.xcontent.XContentParser parser, java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-