Class PhraseSuggestion.Entry
- java.lang.Object
-
- org.elasticsearch.search.suggest.Suggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option>
-
- org.elasticsearch.search.suggest.phrase.PhraseSuggestion.Entry
-
- All Implemented Interfaces:
java.lang.Iterable<Suggest.Suggestion.Entry.Option>
,Streamable
,ToXContent
,ToXContentObject
- Enclosing class:
- PhraseSuggestion
public static class PhraseSuggestion.Entry extends Suggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry
Suggest.Suggestion.Entry.Option
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
Fields Modifier and Type Field Description protected double
cutoffScore
-
Fields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry
length, offset, options, OPTIONS, text
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description void
addOption(Suggest.Suggestion.Entry.Option option)
static PhraseSuggestion.Entry
fromXContent(XContentParser parser)
double
getCutoffScore()
protected void
merge(Suggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option> other)
Merge any extra fields for this subtype.void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry
addOptions, declareCommonFields, equals, getLength, getOffset, getOptions, getText, hashCode, iterator, newOption, reduce, sort, toXContent
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
Entry
public Entry(Text text, int offset, int length, double cutoffScore)
-
-
Method Detail
-
getCutoffScore
public double getCutoffScore()
- Returns:
- cutoff score for suggestions. input term score * confidence for phrase suggest, 0 otherwise
-
merge
protected void merge(Suggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option> other)
Description copied from class:Suggest.Suggestion.Entry
Merge any extra fields for this subtype.- Overrides:
merge
in classSuggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option>
-
addOption
public void addOption(Suggest.Suggestion.Entry.Option option)
- Overrides:
addOption
in classSuggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option>
-
fromXContent
public static PhraseSuggestion.Entry fromXContent(XContentParser parser)
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classSuggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Overrides:
writeTo
in classSuggest.Suggestion.Entry<Suggest.Suggestion.Entry.Option>
- Throws:
java.io.IOException
-
-