Class PhraseSuggestion.Entry
- java.lang.Object
-
- org.elasticsearch.search.suggest.Suggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
-
- org.elasticsearch.search.suggest.phrase.PhraseSuggestion.Entry
-
- All Implemented Interfaces:
java.lang.Iterable<PhraseSuggestion.Entry.Option>
,Writeable
,ToXContent
,ToXContentFragment
- Enclosing class:
- PhraseSuggestion
public static class PhraseSuggestion.Entry extends Suggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PhraseSuggestion.Entry.Option
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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 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(PhraseSuggestion.Entry.Option option)
boolean
equals(java.lang.Object other)
static PhraseSuggestion.Entry
fromXContent(XContentParser parser)
double
getCutoffScore()
int
hashCode()
protected void
merge(Suggest.Suggestion.Entry<PhraseSuggestion.Entry.Option> other)
Merge any extra fields for this subtype.protected PhraseSuggestion.Entry.Option
newOption(StreamInput in)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry
addOptions, declareCommonFields, getLength, getOffset, getOptions, getText, iterator, 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.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
Entry
public Entry(Text text, int offset, int length, double cutoffScore)
-
Entry
public Entry(Text text, int offset, int length)
-
Entry
public Entry(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
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<PhraseSuggestion.Entry.Option> other)
Description copied from class:Suggest.Suggestion.Entry
Merge any extra fields for this subtype.- Overrides:
merge
in classSuggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
-
addOption
public void addOption(PhraseSuggestion.Entry.Option option)
- Overrides:
addOption
in classSuggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
-
fromXContent
public static PhraseSuggestion.Entry fromXContent(XContentParser parser)
-
newOption
protected PhraseSuggestion.Entry.Option newOption(StreamInput in) throws java.io.IOException
- Specified by:
newOption
in classSuggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classSuggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classSuggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSuggest.Suggestion.Entry<PhraseSuggestion.Entry.Option>
-
-