Interface RetrieveResultItem.Builder

All Superinterfaces:
Buildable, CopyableBuilder<RetrieveResultItem.Builder,RetrieveResultItem>, SdkBuilder<RetrieveResultItem.Builder,RetrieveResultItem>, SdkPojo
Enclosing class:
RetrieveResultItem

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

    • id

      The identifier of the relevant passage result.

      Parameters:
      id - The identifier of the relevant passage result.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentId

      RetrieveResultItem.Builder documentId(String documentId)

      The identifier of the document.

      Parameters:
      documentId - The identifier of the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentTitle

      RetrieveResultItem.Builder documentTitle(String documentTitle)

      The title of the document.

      Parameters:
      documentTitle - The title of the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • content

      The contents of the relevant passage.

      Parameters:
      content - The contents of the relevant passage.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentURI

      RetrieveResultItem.Builder documentURI(String documentURI)

      The URI of the original location of the document.

      Parameters:
      documentURI - The URI of the original location of the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentAttributes

      RetrieveResultItem.Builder documentAttributes(Collection<DocumentAttribute> documentAttributes)

      An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.

      Parameters:
      documentAttributes - An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentAttributes

      RetrieveResultItem.Builder documentAttributes(DocumentAttribute... documentAttributes)

      An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.

      Parameters:
      documentAttributes - An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentAttributes

      RetrieveResultItem.Builder documentAttributes(Consumer<DocumentAttribute.Builder>... documentAttributes)

      An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to documentAttributes(List<DocumentAttribute>).

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

      RetrieveResultItem.Builder scoreAttributes(ScoreAttributes scoreAttributes)

      The confidence score bucket for a retrieved passage result. The confidence bucket provides a relative ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.

      Parameters:
      scoreAttributes - The confidence score bucket for a retrieved passage result. The confidence bucket provides a relative ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scoreAttributes

      default RetrieveResultItem.Builder scoreAttributes(Consumer<ScoreAttributes.Builder> scoreAttributes)

      The confidence score bucket for a retrieved passage result. The confidence bucket provides a relative ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.

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

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

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