Class CustomSuggestionBuilder
java.lang.Object
org.opensearch.search.suggest.SuggestionBuilder<CustomSuggestionBuilder>
org.opensearch.example.customsuggester.CustomSuggestionBuilder
- All Implemented Interfaces:
NamedWriteable,Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.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
FieldsModifier and TypeFieldDescriptionprotected static final org.opensearch.core.ParseFieldstatic final StringFields 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.core.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(org.opensearch.core.xcontent.XContentParser parser) protected org.opensearch.core.xcontent.XContentBuilderinnerToXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.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.core.xcontent.ToXContentFragment
isFragment
-
Field Details
-
SUGGESTION_NAME
- See Also:
-
RANDOM_SUFFIX_FIELD
protected static final org.opensearch.core.ParseField 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 org.opensearch.core.xcontent.XContentBuilder innerToXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.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
public static CustomSuggestionBuilder fromXContent(org.opensearch.core.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
build
public SuggestionSearchContext.SuggestionContext build(QueryShardContext context) throws IOException - Specified by:
buildin classSuggestionBuilder<CustomSuggestionBuilder>- Throws:
IOException
-