public static interface QueryResultItem.Builder extends SdkPojo, CopyableBuilder<QueryResultItem.Builder,QueryResultItem>
| Modifier and Type | Method and Description |
|---|---|
QueryResultItem.Builder |
additionalAttributes(AdditionalResultAttribute... additionalAttributes)
One or more additional attributes associated with the query result.
|
QueryResultItem.Builder |
additionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional attributes associated with the query result.
|
QueryResultItem.Builder |
additionalAttributes(Consumer<AdditionalResultAttribute.Builder>... additionalAttributes)
One or more additional attributes associated with the query result.
|
QueryResultItem.Builder |
documentAttributes(Collection<DocumentAttribute> documentAttributes)
An array of document attributes assigned to a document in the search results.
|
QueryResultItem.Builder |
documentAttributes(Consumer<DocumentAttribute.Builder>... documentAttributes)
An array of document attributes assigned to a document in the search results.
|
QueryResultItem.Builder |
documentAttributes(DocumentAttribute... documentAttributes)
An array of document 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.
|
QueryResultItem.Builder |
documentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document.
|
QueryResultItem.Builder |
documentId(String documentId)
The identifier for the document.
|
default QueryResultItem.Builder |
documentTitle(Consumer<TextWithHighlights.Builder> documentTitle)
The title of the document.
|
QueryResultItem.Builder |
documentTitle(TextWithHighlights documentTitle)
The title of the document.
|
QueryResultItem.Builder |
documentURI(String documentURI)
The URI of the original location of the document.
|
QueryResultItem.Builder |
feedbackToken(String feedbackToken)
A token that identifies a particular result from a particular query.
|
QueryResultItem.Builder |
format(QueryResultFormat format)
If the
Type of document within the response is ANSWER, then it is either a
TABLE answer or TEXT answer. |
QueryResultItem.Builder |
format(String format)
If the
Type of document within the response is ANSWER, then it is either a
TABLE answer or TEXT answer. |
QueryResultItem.Builder |
id(String id)
The identifier for the query result.
|
default QueryResultItem.Builder |
scoreAttributes(Consumer<ScoreAttributes.Builder> scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided.
|
QueryResultItem.Builder |
scoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided.
|
default QueryResultItem.Builder |
tableExcerpt(Consumer<TableExcerpt.Builder> tableExcerpt)
An excerpt from a table within a document.
|
QueryResultItem.Builder |
tableExcerpt(TableExcerpt tableExcerpt)
An excerpt from a table within a document.
|
QueryResultItem.Builder |
type(QueryResultType type)
The type of document within the response.
|
QueryResultItem.Builder |
type(String type)
The type of document within the response.
|
equalsBySdkFields, sdkFieldscopyapplyMutation, buildQueryResultItem.Builder id(String id)
The identifier for the query result.
id - The identifier for the query result.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.
type - The type of document within the response. For example, a response could include a question-answer
that's relevant to the query.QueryResultType,
QueryResultTypeQueryResultItem.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.
type - The type of document within the response. For example, a response could include a question-answer
that's relevant to the query.QueryResultType,
QueryResultTypeQueryResultItem.Builder format(String format)
If the Type of document within the response is ANSWER, then it is either a
TABLE answer or TEXT answer. If it's a table answer, a table excerpt is returned in
TableExcerpt. If it's a text answer, a text excerpt is returned in DocumentExcerpt.
format - If the Type of document within the response is ANSWER, then it is either a
TABLE answer or TEXT answer. If it's a table answer, a table excerpt is
returned in TableExcerpt. If it's a text answer, a text excerpt is returned in
DocumentExcerpt.QueryResultFormat,
QueryResultFormatQueryResultItem.Builder format(QueryResultFormat format)
If the Type of document within the response is ANSWER, then it is either a
TABLE answer or TEXT answer. If it's a table answer, a table excerpt is returned in
TableExcerpt. If it's a text answer, a text excerpt is returned in DocumentExcerpt.
format - If the Type of document within the response is ANSWER, then it is either a
TABLE answer or TEXT answer. If it's a table answer, a table excerpt is
returned in TableExcerpt. If it's a text answer, a text excerpt is returned in
DocumentExcerpt.QueryResultFormat,
QueryResultFormatQueryResultItem.Builder additionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional attributes associated with the query result.
additionalAttributes - One or more additional attributes associated with the query result.QueryResultItem.Builder additionalAttributes(AdditionalResultAttribute... additionalAttributes)
One or more additional attributes associated with the query result.
additionalAttributes - One or more additional attributes associated with the query result.QueryResultItem.Builder additionalAttributes(Consumer<AdditionalResultAttribute.Builder>... additionalAttributes)
One or more additional 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 via
AdditionalResultAttribute.builder().
When the Consumer completes,
SdkBuilder.build() is called
immediately and its result is passed to #additionalAttributes(List.
additionalAttributes - a consumer that will call methods on
AdditionalResultAttribute.Builder#additionalAttributes(java.util.Collection) QueryResultItem.Builder documentId(String documentId)
The identifier for the document.
documentId - The identifier for the document.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.
documentTitle - The title of the document. Contains the text of the title and information for highlighting the
relevant terms in the title.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.Builder avoiding the
need to create one manually via TextWithHighlights.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its
result is passed to documentTitle(TextWithHighlights).
documentTitle - a consumer that will call methods on TextWithHighlights.BuilderdocumentTitle(TextWithHighlights)QueryResultItem.Builder documentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
documentExcerpt - An extract of the text in the document. Contains information about highlighting the relevant terms in
the excerpt.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 via TextWithHighlights.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its
result is passed to documentExcerpt(TextWithHighlights).
documentExcerpt - a consumer that will call methods on TextWithHighlights.BuilderdocumentExcerpt(TextWithHighlights)QueryResultItem.Builder documentURI(String documentURI)
The URI of the original location of the document.
documentURI - The URI of the original location of the document.QueryResultItem.Builder documentAttributes(Collection<DocumentAttribute> documentAttributes)
An array of document attributes assigned to a document in the search results. For example, the document
author (_author) or the source URI (_source_uri) of the document.
documentAttributes - An array of document attributes assigned to a document in the search results. For example, the
document author (_author) or the source URI (_source_uri) of the document.QueryResultItem.Builder documentAttributes(DocumentAttribute... documentAttributes)
An array of document attributes assigned to a document in the search results. For example, the document
author (_author) or the source URI (_source_uri) of the document.
documentAttributes - An array of document attributes assigned to a document in the search results. For example, the
document author (_author) or the source URI (_source_uri) of the document.QueryResultItem.Builder documentAttributes(Consumer<DocumentAttribute.Builder>... documentAttributes)
An array of document attributes assigned to a document in the search results. For example, the document
author (_author) or the source URI (_source_uri) of the document.
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.
documentAttributes - a consumer that will call methods on
DocumentAttribute.Builder#documentAttributes(java.util.Collection) QueryResultItem.Builder scoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each
result is placed into a bin that indicates the confidence, VERY_HIGH, HIGH,
MEDIUM and LOW. 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 the Type field is set to DOCUMENT
and Amazon Kendra is not confident that the result matches the query.
scoreAttributes - Indicates the confidence that Amazon Kendra has that a result matches the query that you provided.
Each result is placed into a bin that indicates the confidence, VERY_HIGH,
HIGH, MEDIUM and LOW. 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 the Type field is set to
DOCUMENT and Amazon Kendra is not confident that the result matches the query.
default QueryResultItem.Builder scoreAttributes(Consumer<ScoreAttributes.Builder> scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each
result is placed into a bin that indicates the confidence, VERY_HIGH, HIGH,
MEDIUM and LOW. 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 the Type field is set to DOCUMENT
and Amazon Kendra is not confident that the result matches the query.
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).
scoreAttributes - a consumer that will call methods on ScoreAttributes.BuilderscoreAttributes(ScoreAttributes)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 .
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 .QueryResultItem.Builder tableExcerpt(TableExcerpt tableExcerpt)
An excerpt from a table within a document.
tableExcerpt - An excerpt from a table within a document.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.Builder avoiding the need
to create one manually via TableExcerpt.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its
result is passed to tableExcerpt(TableExcerpt).
tableExcerpt - a consumer that will call methods on TableExcerpt.BuildertableExcerpt(TableExcerpt)Copyright © 2023. All rights reserved.