Interface QueryResultItem.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<QueryResultItem.Builder,
,QueryResultItem> SdkBuilder<QueryResultItem.Builder,
,QueryResultItem> SdkPojo
- Enclosing class:
QueryResultItem
-
Method Summary
Modifier and TypeMethodDescriptionadditionalAttributes
(Collection<AdditionalResultAttribute> additionalAttributes) One or more additional fields/attributes associated with the query result.additionalAttributes
(Consumer<AdditionalResultAttribute.Builder>... additionalAttributes) One or more additional fields/attributes associated with the query result.additionalAttributes
(AdditionalResultAttribute... additionalAttributes) One or more additional fields/attributes associated with the query result.default QueryResultItem.Builder
collapsedResultDetail
(Consumer<CollapsedResultDetail.Builder> collapsedResultDetail) Provides details about a collapsed group of search results.collapsedResultDetail
(CollapsedResultDetail collapsedResultDetail) Provides details about a collapsed group of search results.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.default QueryResultItem.Builder
documentExcerpt
(Consumer<TextWithHighlights.Builder> documentExcerpt) An extract of the text in the document.documentExcerpt
(TextWithHighlights documentExcerpt) An extract of the text in the document.documentId
(String documentId) The identifier for the document.default QueryResultItem.Builder
documentTitle
(Consumer<TextWithHighlights.Builder> documentTitle) The title of the document.documentTitle
(TextWithHighlights documentTitle) The title of the document.documentURI
(String documentURI) The URI of the original location of the document.feedbackToken
(String feedbackToken) A token that identifies a particular result from a particular query.If theType
of document within the response isANSWER
, then it is either aTABLE
answer orTEXT
answer.format
(QueryResultFormat format) If theType
of document within the response isANSWER
, then it is either aTABLE
answer orTEXT
answer.The unique identifier for the query result item id (Id
) and the query result item document id (DocumentId
) combined.default QueryResultItem.Builder
scoreAttributes
(Consumer<ScoreAttributes.Builder> scoreAttributes) Indicates the confidence level of Amazon Kendra providing a relevant result for the query.scoreAttributes
(ScoreAttributes scoreAttributes) Indicates the confidence level of Amazon Kendra providing a relevant result for the query.default QueryResultItem.Builder
tableExcerpt
(Consumer<TableExcerpt.Builder> tableExcerpt) An excerpt from a table within a document.tableExcerpt
(TableExcerpt tableExcerpt) An excerpt from a table within a document.The type of document within the response.type
(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 Details
-
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
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:
-
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:
-
format
If the
Type
of document within the response isANSWER
, then it is either aTABLE
answer orTEXT
answer. 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 theType
of document within the response isANSWER
, then it is either aTABLE
answer orTEXT
answer. 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:
-
format
If the
Type
of document within the response isANSWER
, then it is either aTABLE
answer orTEXT
answer. 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 theType
of document within the response isANSWER
, then it is either aTABLE
answer orTEXT
answer. 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:
-
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
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.Builder
avoiding the need to create one manually viaAdditionalResultAttribute.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toadditionalAttributes(List<AdditionalResultAttribute>)
.- 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:
-
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
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
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.Builder
avoiding the need to create one manually viaTextWithHighlights.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaTextWithHighlights.builder()
.When the
Consumer
completes,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:
-
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
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.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
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
,MEDIUM
andLOW
. You can use the score to determine if a response meets the confidence needed for your application.The field is only set to
LOW
when theType
field is set toDOCUMENT
and 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
,MEDIUM
andLOW
. You can use the score to determine if a response meets the confidence needed for your application.The field is only set to
LOW
when theType
field is set toDOCUMENT
and 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
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
,MEDIUM
andLOW
. 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 theLOW
when theType
field is set toDOCUMENT
and Amazon Kendra is not confident that the result is relevant to the query.ScoreAttributes.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:
-
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
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
An excerpt from a table within a document.
This is a convenience method that creates an instance of theTableExcerpt.Builder
avoiding the need to create one manually viaTableExcerpt.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaCollapsedResultDetail.builder()
.When the
Consumer
completes,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:
-