Interface RetrieveResultItem.Builder

    • Method Detail

      • id

        RetrieveResultItem.Builder id​(String 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

        RetrieveResultItem.Builder content​(String 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).

        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:
        #documentAttributes(java.util.Collection)
      • 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.