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>,Streamable,ToXContent,ToXContentFragment
public class PhraseSuggestion extends Suggest.Suggestion<PhraseSuggestion.Entry>
Suggestion entry returned from thePhraseSuggester.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPhraseSuggestion.Entry-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
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()PhraseSuggestion(java.lang.String name, int size)
-
Method Summary
Modifier and Type Method Description static PhraseSuggestionfromXContent(XContentParser parser, java.lang.String name)protected java.lang.StringgetType()Returns a string representing the type of the suggestion.intgetWriteableType()Returns a integer representing the type of the suggestion.protected PhraseSuggestion.EntrynewEntry()-
Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
addTerm, fromXContent, getEntries, getName, getSize, innerReadFrom, innerWriteTo, iterator, parseEntries, readFrom, reduce, sortComparator, toXContent, trim, writeTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
TYPE
public static final int TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWriteableType
public int getWriteableType()
Description copied from class:Suggest.SuggestionReturns a integer representing the type of the suggestion. This is used for internal serialization over the network.- Overrides:
getWriteableTypein classSuggest.Suggestion<PhraseSuggestion.Entry>
-
getType
protected java.lang.String getType()
Description copied from class:Suggest.SuggestionReturns a string representing the type of the suggestion. This type is added to the suggestion name in the XContent response, so that it can later be used by REST clients to determine the internal type of the suggestion.- Overrides:
getTypein classSuggest.Suggestion<PhraseSuggestion.Entry>
-
newEntry
protected PhraseSuggestion.Entry newEntry()
- Overrides:
newEntryin classSuggest.Suggestion<PhraseSuggestion.Entry>
-
fromXContent
public static PhraseSuggestion fromXContent(XContentParser parser, java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
-