Class CustomSuggestionBuilder
java.lang.Object
org.opensearch.search.suggest.SuggestionBuilder<CustomSuggestionBuilder>
org.opensearch.example.customsuggester.CustomSuggestionBuilder
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V extends Object>, Writeable.Writer<V extends Object> -
Field Summary
FieldsFields inherited from class org.opensearch.search.suggest.SuggestionBuilder
analyzer, ANALYZER_FIELD, field, FIELDNAME_FIELD, prefix, PREFIX_FIELD, regex, REGEX_FIELD, shardSize, SHARDSIZE_FIELD, size, SIZE_FIELD, text, TEXT_FIELDFields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionCustomSuggestionBuilder(String randomField, String randomSuffix) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionbuild(QueryShardContext context) protected booleandoEquals(CustomSuggestionBuilder other) protected intvoiddoWriteTo(StreamOutput out) static CustomSuggestionBuilderfromXContent(XContentParser parser) protected XContentBuilderinnerToXContent(XContentBuilder builder, ToXContent.Params params) Methods inherited from class org.opensearch.search.suggest.SuggestionBuilder
analyzer, analyzer, equals, field, hashCode, populateCommonFields, prefix, prefix, regex, regex, shardSize, shardSize, size, size, text, text, toXContent, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
SUGGESTION_NAME
- See Also:
-
RANDOM_SUFFIX_FIELD
-
-
Constructor Details
-
CustomSuggestionBuilder
-
CustomSuggestionBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteToin classSuggestionBuilder<CustomSuggestionBuilder>- Throws:
IOException
-
innerToXContent
protected XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
innerToXContentin classSuggestionBuilder<CustomSuggestionBuilder>- Throws:
IOException
-
getWriteableName
-
doEquals
- Specified by:
doEqualsin classSuggestionBuilder<CustomSuggestionBuilder>
-
doHashCode
protected int doHashCode()- Specified by:
doHashCodein classSuggestionBuilder<CustomSuggestionBuilder>
-
fromXContent
- Throws:
IOException
-
build
public SuggestionSearchContext.SuggestionContext build(QueryShardContext context) throws IOException - Specified by:
buildin classSuggestionBuilder<CustomSuggestionBuilder>- Throws:
IOException
-