Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data QueryResultItem = QueryResultItem' {
- additionalAttributes :: Maybe [AdditionalResultAttribute]
- documentAttributes :: Maybe [DocumentAttribute]
- documentExcerpt :: Maybe TextWithHighlights
- documentId :: Maybe Text
- documentTitle :: Maybe TextWithHighlights
- documentURI :: Maybe Text
- feedbackToken :: Maybe Text
- format :: Maybe QueryResultFormat
- id :: Maybe Text
- scoreAttributes :: Maybe ScoreAttributes
- tableExcerpt :: Maybe TableExcerpt
- type' :: Maybe QueryResultType
- newQueryResultItem :: QueryResultItem
- queryResultItem_additionalAttributes :: Lens' QueryResultItem (Maybe [AdditionalResultAttribute])
- queryResultItem_documentAttributes :: Lens' QueryResultItem (Maybe [DocumentAttribute])
- queryResultItem_documentExcerpt :: Lens' QueryResultItem (Maybe TextWithHighlights)
- queryResultItem_documentId :: Lens' QueryResultItem (Maybe Text)
- queryResultItem_documentTitle :: Lens' QueryResultItem (Maybe TextWithHighlights)
- queryResultItem_documentURI :: Lens' QueryResultItem (Maybe Text)
- queryResultItem_feedbackToken :: Lens' QueryResultItem (Maybe Text)
- queryResultItem_format :: Lens' QueryResultItem (Maybe QueryResultFormat)
- queryResultItem_id :: Lens' QueryResultItem (Maybe Text)
- queryResultItem_scoreAttributes :: Lens' QueryResultItem (Maybe ScoreAttributes)
- queryResultItem_tableExcerpt :: Lens' QueryResultItem (Maybe TableExcerpt)
- queryResultItem_type :: Lens' QueryResultItem (Maybe QueryResultType)
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.
QueryResultItem' | |
|
Instances
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.