Interface RetrieveResultItem.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<RetrieveResultItem.Builder,
,RetrieveResultItem> SdkBuilder<RetrieveResultItem.Builder,
,RetrieveResultItem> SdkPojo
- Enclosing class:
RetrieveResultItem
-
Method Summary
Modifier and TypeMethodDescriptionThe contents of the relevant passage.documentAttributes
(Collection<DocumentAttribute> documentAttributes) An array of document fields/attributes assigned to a document in the search results.documentAttributes
(Consumer<DocumentAttribute.Builder>... documentAttributes) An array of document fields/attributes assigned to a document in the search results.documentAttributes
(DocumentAttribute... documentAttributes) An array of document fields/attributes assigned to a document in the search results.documentId
(String documentId) The identifier of the document.documentTitle
(String documentTitle) The title of the document.documentURI
(String documentURI) The URI of the original location of the document.The identifier of the relevant passage result.default RetrieveResultItem.Builder
scoreAttributes
(Consumer<ScoreAttributes.Builder> scoreAttributes) The confidence score bucket for a retrieved passage result.scoreAttributes
(ScoreAttributes scoreAttributes) The confidence score bucket for a retrieved passage result.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
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
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
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
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
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
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 (
This is a convenience method that creates an instance of the_author
) or the source URI (_source_uri
) of the document.DocumentAttribute.Builder
avoiding the need to create one manually viaDocumentAttribute.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todocumentAttributes(List<DocumentAttribute>)
.- Parameters:
documentAttributes
- a consumer that will call methods onDocumentAttribute.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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 theScoreAttributes.Builder
avoiding the need to create one manually viaScoreAttributes.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toscoreAttributes(ScoreAttributes)
.- Parameters:
scoreAttributes
- a consumer that will call methods onScoreAttributes.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-