amazonka-kendra-2.0: Amazon KendraFrontendService SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Kendra.Types.QueryResultItem

Description

 
Synopsis

Documentation

data QueryResultItem Source #

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.

See: newQueryResultItem smart constructor.

Constructors

QueryResultItem' 

Fields

  • additionalAttributes :: Maybe [AdditionalResultAttribute]

    One or more additional attributes associated with the query result.

  • documentAttributes :: Maybe [DocumentAttribute]

    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.

  • documentExcerpt :: Maybe TextWithHighlights

    An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.

  • documentId :: Maybe Text

    The identifier for the document.

  • documentTitle :: Maybe TextWithHighlights

    The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.

  • documentURI :: Maybe Text

    The URI of the original location of the document.

  • feedbackToken :: Maybe Text

    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 .

  • format :: Maybe 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.

  • id :: Maybe Text

    The identifier for the query result.

  • scoreAttributes :: Maybe 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.

  • tableExcerpt :: Maybe TableExcerpt

    An excerpt from a table within a document.

  • type' :: Maybe QueryResultType

    The type of document within the response. For example, a response could include a question-answer that's relevant to the query.

Instances

Instances details
FromJSON QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

Generic QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

Associated Types

type Rep QueryResultItem :: Type -> Type #

Read QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

Show QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

NFData QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

Methods

rnf :: QueryResultItem -> () #

Eq QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

Hashable QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

type Rep QueryResultItem Source # 
Instance details

Defined in Amazonka.Kendra.Types.QueryResultItem

type Rep QueryResultItem = D1 ('MetaData "QueryResultItem" "Amazonka.Kendra.Types.QueryResultItem" "amazonka-kendra-2.0-IHloXAWlYIS8YTp1gXe6J" 'False) (C1 ('MetaCons "QueryResultItem'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "additionalAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AdditionalResultAttribute])) :*: (S1 ('MetaSel ('Just "documentAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DocumentAttribute])) :*: S1 ('MetaSel ('Just "documentExcerpt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TextWithHighlights)))) :*: (S1 ('MetaSel ('Just "documentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "documentTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TextWithHighlights)) :*: S1 ('MetaSel ('Just "documentURI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "feedbackToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryResultFormat)) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "scoreAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ScoreAttributes)) :*: (S1 ('MetaSel ('Just "tableExcerpt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TableExcerpt)) :*: S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryResultType)))))))

newQueryResultItem :: QueryResultItem Source #

Create a value of QueryResultItem with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:additionalAttributes:QueryResultItem', queryResultItem_additionalAttributes - One or more additional attributes associated with the query result.

$sel:documentAttributes:QueryResultItem', queryResultItem_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.

$sel:documentExcerpt:QueryResultItem', queryResultItem_documentExcerpt - An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.

$sel:documentId:QueryResultItem', queryResultItem_documentId - The identifier for the document.

$sel:documentTitle:QueryResultItem', queryResultItem_documentTitle - The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.

$sel:documentURI:QueryResultItem', queryResultItem_documentURI - The URI of the original location of the document.

$sel:feedbackToken:QueryResultItem', queryResultItem_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 .

$sel:format:QueryResultItem', queryResultItem_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.

$sel:id:QueryResultItem', queryResultItem_id - The identifier for the query result.

$sel:scoreAttributes:QueryResultItem', queryResultItem_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.

$sel:tableExcerpt:QueryResultItem', queryResultItem_tableExcerpt - An excerpt from a table within a document.

$sel:type':QueryResultItem', queryResultItem_type - The type of document within the response. For example, a response could include a question-answer that's relevant to the query.

queryResultItem_additionalAttributes :: Lens' QueryResultItem (Maybe [AdditionalResultAttribute]) Source #

One or more additional attributes associated with the query result.

queryResultItem_documentAttributes :: Lens' QueryResultItem (Maybe [DocumentAttribute]) Source #

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_documentExcerpt :: Lens' QueryResultItem (Maybe TextWithHighlights) Source #

An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.

queryResultItem_documentId :: Lens' QueryResultItem (Maybe Text) Source #

The identifier for the document.

queryResultItem_documentTitle :: Lens' QueryResultItem (Maybe TextWithHighlights) Source #

The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.

queryResultItem_documentURI :: Lens' QueryResultItem (Maybe Text) Source #

The URI of the original location of the document.

queryResultItem_feedbackToken :: Lens' QueryResultItem (Maybe Text) Source #

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_format :: Lens' QueryResultItem (Maybe QueryResultFormat) Source #

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.

queryResultItem_id :: Lens' QueryResultItem (Maybe Text) Source #

The identifier for the query result.

queryResultItem_scoreAttributes :: Lens' QueryResultItem (Maybe ScoreAttributes) Source #

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.

queryResultItem_tableExcerpt :: Lens' QueryResultItem (Maybe TableExcerpt) Source #

An excerpt from a table within a document.

queryResultItem_type :: Lens' QueryResultItem (Maybe QueryResultType) Source #

The type of document within the response. For example, a response could include a question-answer that's relevant to the query.