Interface QueryResultItem.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<QueryResultItem.Builder,QueryResultItem>,SdkBuilder<QueryResultItem.Builder,QueryResultItem>,SdkPojo
- Enclosing class:
- QueryResultItem
public static interface QueryResultItem.Builder extends SdkPojo, CopyableBuilder<QueryResultItem.Builder,QueryResultItem>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description QueryResultItem.BuilderadditionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)One or more additional fields/attributes associated with the query result.QueryResultItem.BuilderadditionalAttributes(Consumer<AdditionalResultAttribute.Builder>... additionalAttributes)One or more additional fields/attributes associated with the query result.QueryResultItem.BuilderadditionalAttributes(AdditionalResultAttribute... additionalAttributes)One or more additional fields/attributes associated with the query result.default QueryResultItem.BuildercollapsedResultDetail(Consumer<CollapsedResultDetail.Builder> collapsedResultDetail)Provides details about a collapsed group of search results.QueryResultItem.BuildercollapsedResultDetail(CollapsedResultDetail collapsedResultDetail)Provides details about a collapsed group of search results.QueryResultItem.BuilderdocumentAttributes(Collection<DocumentAttribute> documentAttributes)An array of document fields/attributes assigned to a document in the search results.QueryResultItem.BuilderdocumentAttributes(Consumer<DocumentAttribute.Builder>... documentAttributes)An array of document fields/attributes assigned to a document in the search results.QueryResultItem.BuilderdocumentAttributes(DocumentAttribute... documentAttributes)An array of document fields/attributes assigned to a document in the search results.default QueryResultItem.BuilderdocumentExcerpt(Consumer<TextWithHighlights.Builder> documentExcerpt)An extract of the text in the document.QueryResultItem.BuilderdocumentExcerpt(TextWithHighlights documentExcerpt)An extract of the text in the document.QueryResultItem.BuilderdocumentId(String documentId)The identifier for the document.default QueryResultItem.BuilderdocumentTitle(Consumer<TextWithHighlights.Builder> documentTitle)The title of the document.QueryResultItem.BuilderdocumentTitle(TextWithHighlights documentTitle)The title of the document.QueryResultItem.BuilderdocumentURI(String documentURI)The URI of the original location of the document.QueryResultItem.BuilderfeedbackToken(String feedbackToken)A token that identifies a particular result from a particular query.QueryResultItem.Builderformat(String format)If theTypeof document within the response isANSWER, then it is either aTABLEanswer orTEXTanswer.QueryResultItem.Builderformat(QueryResultFormat format)If theTypeof document within the response isANSWER, then it is either aTABLEanswer orTEXTanswer.QueryResultItem.Builderid(String id)The unique identifier for the query result item id (Id) and the query result item document id (DocumentId) combined.default QueryResultItem.BuilderscoreAttributes(Consumer<ScoreAttributes.Builder> scoreAttributes)Indicates the confidence level of Amazon Kendra providing a relevant result for the query.QueryResultItem.BuilderscoreAttributes(ScoreAttributes scoreAttributes)Indicates the confidence level of Amazon Kendra providing a relevant result for the query.default QueryResultItem.BuildertableExcerpt(Consumer<TableExcerpt.Builder> tableExcerpt)An excerpt from a table within a document.QueryResultItem.BuildertableExcerpt(TableExcerpt tableExcerpt)An excerpt from a table within a document.QueryResultItem.Buildertype(String type)The type of document within the response.QueryResultItem.Buildertype(QueryResultType type)The type of document within the response.-
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 Detail
-
id
QueryResultItem.Builder id(String id)
The unique identifier for the query result item id (
Id) and the query result item document id (DocumentId) combined. The value of this field changes with every request, even when you have the same documents.- Parameters:
id- The unique identifier for the query result item id (Id) and the query result item document id (DocumentId) combined. The value of this field changes with every request, even when you have the same documents.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
type
QueryResultItem.Builder type(String type)
The type of document within the response. For example, a response could include a question-answer that's relevant to the query.
- Parameters:
type- The type of document within the response. For example, a response could include a question-answer that's relevant to the query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
QueryResultType,QueryResultType
-
type
QueryResultItem.Builder type(QueryResultType type)
The type of document within the response. For example, a response could include a question-answer that's relevant to the query.
- Parameters:
type- The type of document within the response. For example, a response could include a question-answer that's relevant to the query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
QueryResultType,QueryResultType
-
format
QueryResultItem.Builder format(String format)
If the
Typeof document within the response isANSWER, then it is either aTABLEanswer orTEXTanswer. If it's a table answer, a table excerpt is returned inTableExcerpt. If it's a text answer, a text excerpt is returned inDocumentExcerpt.- Parameters:
format- If theTypeof document within the response isANSWER, then it is either aTABLEanswer orTEXTanswer. If it's a table answer, a table excerpt is returned inTableExcerpt. If it's a text answer, a text excerpt is returned inDocumentExcerpt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
QueryResultFormat,QueryResultFormat
-
format
QueryResultItem.Builder format(QueryResultFormat format)
If the
Typeof document within the response isANSWER, then it is either aTABLEanswer orTEXTanswer. If it's a table answer, a table excerpt is returned inTableExcerpt. If it's a text answer, a text excerpt is returned inDocumentExcerpt.- Parameters:
format- If theTypeof document within the response isANSWER, then it is either aTABLEanswer orTEXTanswer. If it's a table answer, a table excerpt is returned inTableExcerpt. If it's a text answer, a text excerpt is returned inDocumentExcerpt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
QueryResultFormat,QueryResultFormat
-
additionalAttributes
QueryResultItem.Builder additionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional fields/attributes associated with the query result.
- Parameters:
additionalAttributes- One or more additional fields/attributes associated with the query result.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
additionalAttributes
QueryResultItem.Builder additionalAttributes(AdditionalResultAttribute... additionalAttributes)
One or more additional fields/attributes associated with the query result.
- Parameters:
additionalAttributes- One or more additional fields/attributes associated with the query result.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
additionalAttributes
QueryResultItem.Builder additionalAttributes(Consumer<AdditionalResultAttribute.Builder>... additionalAttributes)
One or more additional fields/attributes associated with the query result.
This is a convenience method that creates an instance of theAdditionalResultAttribute.Builderavoiding the need to create one manually viaAdditionalResultAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#additionalAttributes(List.) - Parameters:
additionalAttributes- a consumer that will call methods onAdditionalResultAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#additionalAttributes(java.util.Collection)
-
documentId
QueryResultItem.Builder documentId(String documentId)
The identifier for the document.
- Parameters:
documentId- The identifier for the document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
documentTitle
QueryResultItem.Builder documentTitle(TextWithHighlights documentTitle)
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
- Parameters:
documentTitle- The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
documentTitle
default QueryResultItem.Builder documentTitle(Consumer<TextWithHighlights.Builder> documentTitle)
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
This is a convenience method that creates an instance of theTextWithHighlights.Builderavoiding the need to create one manually viaTextWithHighlights.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todocumentTitle(TextWithHighlights).- Parameters:
documentTitle- a consumer that will call methods onTextWithHighlights.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
documentTitle(TextWithHighlights)
-
documentExcerpt
QueryResultItem.Builder documentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
- Parameters:
documentExcerpt- An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
documentExcerpt
default QueryResultItem.Builder documentExcerpt(Consumer<TextWithHighlights.Builder> documentExcerpt)
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
This is a convenience method that creates an instance of theTextWithHighlights.Builderavoiding the need to create one manually viaTextWithHighlights.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todocumentExcerpt(TextWithHighlights).- Parameters:
documentExcerpt- a consumer that will call methods onTextWithHighlights.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
documentExcerpt(TextWithHighlights)
-
documentURI
QueryResultItem.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
QueryResultItem.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
QueryResultItem.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
QueryResultItem.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.Builderavoiding the need to create one manually viaDocumentAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#documentAttributes(List.) - 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:
#documentAttributes(java.util.Collection)
-
scoreAttributes
QueryResultItem.Builder scoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence level of Amazon Kendra providing a relevant result for the query. Each result is placed into a bin that indicates the confidence,
VERY_HIGH,HIGH,MEDIUMandLOW. You can use the score to determine if a response meets the confidence needed for your application.The field is only set to
LOWwhen theTypefield is set toDOCUMENTand Amazon Kendra is not confident that the result is relevant to the query.- Parameters:
scoreAttributes- Indicates the confidence level of Amazon Kendra providing a relevant result for the query. Each result is placed into a bin that indicates the confidence,VERY_HIGH,HIGH,MEDIUMandLOW. You can use the score to determine if a response meets the confidence needed for your application.The field is only set to
LOWwhen theTypefield is set toDOCUMENTand Amazon Kendra is not confident that the result is relevant to the query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scoreAttributes
default QueryResultItem.Builder scoreAttributes(Consumer<ScoreAttributes.Builder> scoreAttributes)
Indicates the confidence level of Amazon Kendra providing a relevant result for the query. Each result is placed into a bin that indicates the confidence,
VERY_HIGH,HIGH,MEDIUMandLOW. You can use the score to determine if a response meets the confidence needed for your application.The field is only set to
This is a convenience method that creates an instance of theLOWwhen theTypefield is set toDOCUMENTand Amazon Kendra is not confident that the result is relevant to the query.ScoreAttributes.Builderavoiding the need to create one manually viaScoreAttributes.builder().When the
Consumercompletes,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:
scoreAttributes(ScoreAttributes)
-
feedbackToken
QueryResultItem.Builder feedbackToken(String feedbackToken)
A token that identifies a particular result from a particular query. Use this token to provide click-through feedback for the result. For more information, see Submitting feedback.
- Parameters:
feedbackToken- A token that identifies a particular result from a particular query. Use this token to provide click-through feedback for the result. For more information, see Submitting feedback.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tableExcerpt
QueryResultItem.Builder tableExcerpt(TableExcerpt tableExcerpt)
An excerpt from a table within a document.
- Parameters:
tableExcerpt- An excerpt from a table within a document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tableExcerpt
default QueryResultItem.Builder tableExcerpt(Consumer<TableExcerpt.Builder> tableExcerpt)
An excerpt from a table within a document.
This is a convenience method that creates an instance of theTableExcerpt.Builderavoiding the need to create one manually viaTableExcerpt.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totableExcerpt(TableExcerpt).- Parameters:
tableExcerpt- a consumer that will call methods onTableExcerpt.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
tableExcerpt(TableExcerpt)
-
collapsedResultDetail
QueryResultItem.Builder collapsedResultDetail(CollapsedResultDetail collapsedResultDetail)
Provides details about a collapsed group of search results.
- Parameters:
collapsedResultDetail- Provides details about a collapsed group of search results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
collapsedResultDetail
default QueryResultItem.Builder collapsedResultDetail(Consumer<CollapsedResultDetail.Builder> collapsedResultDetail)
Provides details about a collapsed group of search results.
This is a convenience method that creates an instance of theCollapsedResultDetail.Builderavoiding the need to create one manually viaCollapsedResultDetail.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocollapsedResultDetail(CollapsedResultDetail).- Parameters:
collapsedResultDetail- a consumer that will call methods onCollapsedResultDetail.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
collapsedResultDetail(CollapsedResultDetail)
-
-