Interface Suggestion.Builder

    • Method Detail

      • id

        Suggestion.Builder id​(String id)

        The UUID (universally unique identifier) of a single query suggestion.

        Parameters:
        id - The UUID (universally unique identifier) of a single query suggestion.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • value

        Suggestion.Builder value​(SuggestionValue value)

        The value for the UUID (universally unique identifier) of a single query suggestion.

        The value is the text string of a suggestion.

        Parameters:
        value - The value for the UUID (universally unique identifier) of a single query suggestion.

        The value is the text string of a suggestion.

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

        Suggestion.Builder sourceDocuments​(Collection<SourceDocument> sourceDocuments)

        The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.

        Parameters:
        sourceDocuments - The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • sourceDocuments

        Suggestion.Builder sourceDocuments​(SourceDocument... sourceDocuments)

        The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.

        Parameters:
        sourceDocuments - The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • sourceDocuments

        Suggestion.Builder sourceDocuments​(Consumer<SourceDocument.Builder>... sourceDocuments)

        The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.

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

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #sourceDocuments(List).

        Parameters:
        sourceDocuments - a consumer that will call methods on SourceDocument.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #sourceDocuments(java.util.Collection)