Struct aws_sdk_kendra::types::QueryResultItem
source · #[non_exhaustive]pub struct QueryResultItem {Show 13 fields
pub id: Option<String>,
pub type: Option<QueryResultType>,
pub format: Option<QueryResultFormat>,
pub additional_attributes: Option<Vec<AdditionalResultAttribute>>,
pub document_id: Option<String>,
pub document_title: Option<TextWithHighlights>,
pub document_excerpt: Option<TextWithHighlights>,
pub document_uri: Option<String>,
pub document_attributes: Option<Vec<DocumentAttribute>>,
pub score_attributes: Option<ScoreAttributes>,
pub feedback_token: Option<String>,
pub table_excerpt: Option<TableExcerpt>,
pub collapsed_result_detail: Option<CollapsedResultDetail>,
}Expand description
A single query result.
A query result contains information about a document returned by the query. This includes the original location of the document, a list of attributes assigned to the document, and relevant text from the document that satisfies the query.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<String>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.
type: Option<QueryResultType>The type of document within the response. For example, a response could include a question-answer that's relevant to the query.
format: Option<QueryResultFormat>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.
additional_attributes: Option<Vec<AdditionalResultAttribute>>One or more additional fields/attributes associated with the query result.
document_id: Option<String>The identifier for the document.
document_title: Option<TextWithHighlights>The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
document_excerpt: Option<TextWithHighlights>An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
document_uri: Option<String>The URI of the original location of the document.
document_attributes: Option<Vec<DocumentAttribute>>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.
score_attributes: Option<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 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 is relevant to the query.
feedback_token: Option<String>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.
table_excerpt: Option<TableExcerpt>An excerpt from a table within a document.
collapsed_result_detail: Option<CollapsedResultDetail>Provides details about a collapsed group of search results.
Implementations§
source§impl QueryResultItem
impl QueryResultItem
sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
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.
sourcepub fn type(&self) -> Option<&QueryResultType>
pub fn type(&self) -> Option<&QueryResultType>
The type of document within the response. For example, a response could include a question-answer that's relevant to the query.
sourcepub fn format(&self) -> Option<&QueryResultFormat>
pub fn format(&self) -> Option<&QueryResultFormat>
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.
sourcepub fn additional_attributes(&self) -> &[AdditionalResultAttribute]
pub fn additional_attributes(&self) -> &[AdditionalResultAttribute]
One or more additional fields/attributes associated with the query result.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .additional_attributes.is_none().
sourcepub fn document_id(&self) -> Option<&str>
pub fn document_id(&self) -> Option<&str>
The identifier for the document.
sourcepub fn document_title(&self) -> Option<&TextWithHighlights>
pub fn document_title(&self) -> Option<&TextWithHighlights>
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
sourcepub fn document_excerpt(&self) -> Option<&TextWithHighlights>
pub fn document_excerpt(&self) -> Option<&TextWithHighlights>
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
sourcepub fn document_uri(&self) -> Option<&str>
pub fn document_uri(&self) -> Option<&str>
The URI of the original location of the document.
sourcepub fn document_attributes(&self) -> &[DocumentAttribute]
pub fn document_attributes(&self) -> &[DocumentAttribute]
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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .document_attributes.is_none().
sourcepub fn score_attributes(&self) -> Option<&ScoreAttributes>
pub fn score_attributes(&self) -> Option<&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 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 is relevant to the query.
sourcepub fn feedback_token(&self) -> Option<&str>
pub fn feedback_token(&self) -> Option<&str>
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.
sourcepub fn table_excerpt(&self) -> Option<&TableExcerpt>
pub fn table_excerpt(&self) -> Option<&TableExcerpt>
An excerpt from a table within a document.
sourcepub fn collapsed_result_detail(&self) -> Option<&CollapsedResultDetail>
pub fn collapsed_result_detail(&self) -> Option<&CollapsedResultDetail>
Provides details about a collapsed group of search results.
source§impl QueryResultItem
impl QueryResultItem
sourcepub fn builder() -> QueryResultItemBuilder
pub fn builder() -> QueryResultItemBuilder
Creates a new builder-style object to manufacture QueryResultItem.
Trait Implementations§
source§impl Clone for QueryResultItem
impl Clone for QueryResultItem
source§fn clone(&self) -> QueryResultItem
fn clone(&self) -> QueryResultItem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for QueryResultItem
impl Debug for QueryResultItem
source§impl PartialEq for QueryResultItem
impl PartialEq for QueryResultItem
impl StructuralPartialEq for QueryResultItem
Auto Trait Implementations§
impl Freeze for QueryResultItem
impl RefUnwindSafe for QueryResultItem
impl Send for QueryResultItem
impl Sync for QueryResultItem
impl Unpin for QueryResultItem
impl UnwindSafe for QueryResultItem
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more