Interface GetQuerySuggestionsRequest.Builder

All Superinterfaces:
AwsRequest.Builder, Buildable, CopyableBuilder<GetQuerySuggestionsRequest.Builder,GetQuerySuggestionsRequest>, KendraRequest.Builder, SdkBuilder<GetQuerySuggestionsRequest.Builder,GetQuerySuggestionsRequest>, SdkPojo, SdkRequest.Builder
Enclosing class:
GetQuerySuggestionsRequest

public static interface GetQuerySuggestionsRequest.Builder extends KendraRequest.Builder, SdkPojo, CopyableBuilder<GetQuerySuggestionsRequest.Builder,GetQuerySuggestionsRequest>
  • Method Details

    • indexId

      The identifier of the index you want to get query suggestions from.

      Parameters:
      indexId - The identifier of the index you want to get query suggestions from.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • queryText

      The text of a user's query to generate query suggestions.

      A query is suggested if the query prefix matches what a user starts to type as their query.

      Amazon Kendra does not show any suggestions if a user types fewer than two characters or more than 60 characters. A query must also have at least one search result and contain at least one word of more than four characters.

      Parameters:
      queryText - The text of a user's query to generate query suggestions.

      A query is suggested if the query prefix matches what a user starts to type as their query.

      Amazon Kendra does not show any suggestions if a user types fewer than two characters or more than 60 characters. A query must also have at least one search result and contain at least one word of more than four characters.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxSuggestionsCount

      GetQuerySuggestionsRequest.Builder maxSuggestionsCount(Integer maxSuggestionsCount)

      The maximum number of query suggestions you want to show to your users.

      Parameters:
      maxSuggestionsCount - The maximum number of query suggestions you want to show to your users.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suggestionTypesWithStrings

      GetQuerySuggestionsRequest.Builder suggestionTypesWithStrings(Collection<String> suggestionTypes)

      The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Parameters:
      suggestionTypes - The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suggestionTypesWithStrings

      GetQuerySuggestionsRequest.Builder suggestionTypesWithStrings(String... suggestionTypes)

      The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Parameters:
      suggestionTypes - The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suggestionTypes

      The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Parameters:
      suggestionTypes - The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suggestionTypes

      GetQuerySuggestionsRequest.Builder suggestionTypes(SuggestionType... suggestionTypes)

      The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Parameters:
      suggestionTypes - The suggestions type to base query suggestions on. The suggestion types are query history or document fields/attributes. You can set one type or the other.

      If you set query history as your suggestions type, Amazon Kendra suggests queries relevant to your users based on popular queries in the query history.

      If you set document fields/attributes as your suggestions type, Amazon Kendra suggests queries relevant to your users based on the contents of document fields.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attributeSuggestionsConfig

      GetQuerySuggestionsRequest.Builder attributeSuggestionsConfig(AttributeSuggestionsGetConfig attributeSuggestionsConfig)

      Configuration information for the document fields/attributes that you want to base query suggestions on.

      Parameters:
      attributeSuggestionsConfig - Configuration information for the document fields/attributes that you want to base query suggestions on.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attributeSuggestionsConfig

      default GetQuerySuggestionsRequest.Builder attributeSuggestionsConfig(Consumer<AttributeSuggestionsGetConfig.Builder> attributeSuggestionsConfig)

      Configuration information for the document fields/attributes that you want to base query suggestions on.

      This is a convenience method that creates an instance of the AttributeSuggestionsGetConfig.Builder avoiding the need to create one manually via AttributeSuggestionsGetConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to attributeSuggestionsConfig(AttributeSuggestionsGetConfig).

      Parameters:
      attributeSuggestionsConfig - a consumer that will call methods on AttributeSuggestionsGetConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • overrideConfiguration

      GetQuerySuggestionsRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.