Skip to content

/AWS1/CL_KNDQUERYRESULTITEM

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.

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_id TYPE /AWS1/KNDRESULTID /AWS1/KNDRESULTID

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.

iv_type TYPE /AWS1/KNDQUERYRESULTTYPE /AWS1/KNDQUERYRESULTTYPE

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

iv_format TYPE /AWS1/KNDQUERYRESULTFORMAT /AWS1/KNDQUERYRESULTFORMAT

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.

it_additionalattributes TYPE /AWS1/CL_KNDADDLRESULTATTR=>TT_ADDLRESULTATTRIBUTELIST TT_ADDLRESULTATTRIBUTELIST

One or more additional fields/attributes associated with the query result.

iv_documentid TYPE /AWS1/KNDDOCUMENTID /AWS1/KNDDOCUMENTID

The identifier for the document.

io_documenttitle TYPE REF TO /AWS1/CL_KNDTEXTWITHHIGHLIGHTS /AWS1/CL_KNDTEXTWITHHIGHLIGHTS

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

io_documentexcerpt TYPE REF TO /AWS1/CL_KNDTEXTWITHHIGHLIGHTS /AWS1/CL_KNDTEXTWITHHIGHLIGHTS

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

iv_documenturi TYPE /AWS1/KNDURL /AWS1/KNDURL

The URI of the original location of the document.

it_documentattributes TYPE /AWS1/CL_KNDDOCUMENTATTRIBUTE=>TT_DOCUMENTATTRIBUTELIST TT_DOCUMENTATTRIBUTELIST

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.

io_scoreattributes TYPE REF TO /AWS1/CL_KNDSCOREATTRIBUTES /AWS1/CL_KNDSCOREATTRIBUTES

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.

iv_feedbacktoken TYPE /AWS1/KNDFEEDBACKTOKEN /AWS1/KNDFEEDBACKTOKEN

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.

io_tableexcerpt TYPE REF TO /AWS1/CL_KNDTABLEEXCERPT /AWS1/CL_KNDTABLEEXCERPT

An excerpt from a table within a document.

io_collapsedresultdetail TYPE REF TO /AWS1/CL_KNDCOLLAPSEDRESULTDET /AWS1/CL_KNDCOLLAPSEDRESULTDET

Provides details about a collapsed group of search results.


Queryable Attributes

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.

Accessible with the following methods

Method Description
GET_ID() Getter for ID, with configurable default
ASK_ID() Getter for ID w/ exceptions if field has no value
HAS_ID() Determine if ID has a value

Type

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

Accessible with the following methods

Method Description
GET_TYPE() Getter for TYPE, with configurable default
ASK_TYPE() Getter for TYPE w/ exceptions if field has no value
HAS_TYPE() Determine if TYPE has a value

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.

Accessible with the following methods

Method Description
GET_FORMAT() Getter for FORMAT, with configurable default
ASK_FORMAT() Getter for FORMAT w/ exceptions if field has no value
HAS_FORMAT() Determine if FORMAT has a value

AdditionalAttributes

One or more additional fields/attributes associated with the query result.

Accessible with the following methods

Method Description
GET_ADDITIONALATTRIBUTES() Getter for ADDITIONALATTRIBUTES, with configurable default
ASK_ADDITIONALATTRIBUTES() Getter for ADDITIONALATTRIBUTES w/ exceptions if field has n
HAS_ADDITIONALATTRIBUTES() Determine if ADDITIONALATTRIBUTES has a value

DocumentId

The identifier for the document.

Accessible with the following methods

Method Description
GET_DOCUMENTID() Getter for DOCUMENTID, with configurable default
ASK_DOCUMENTID() Getter for DOCUMENTID w/ exceptions if field has no value
HAS_DOCUMENTID() Determine if DOCUMENTID has a value

DocumentTitle

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

Accessible with the following methods

Method Description
GET_DOCUMENTTITLE() Getter for DOCUMENTTITLE

DocumentExcerpt

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

Accessible with the following methods

Method Description
GET_DOCUMENTEXCERPT() Getter for DOCUMENTEXCERPT

DocumentURI

The URI of the original location of the document.

Accessible with the following methods

Method Description
GET_DOCUMENTURI() Getter for DOCUMENTURI, with configurable default
ASK_DOCUMENTURI() Getter for DOCUMENTURI w/ exceptions if field has no value
HAS_DOCUMENTURI() Determine if DOCUMENTURI has a value

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.

Accessible with the following methods

Method Description
GET_DOCUMENTATTRIBUTES() Getter for DOCUMENTATTRIBUTES, with configurable default
ASK_DOCUMENTATTRIBUTES() Getter for DOCUMENTATTRIBUTES w/ exceptions if field has no
HAS_DOCUMENTATTRIBUTES() Determine if DOCUMENTATTRIBUTES has a value

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.

Accessible with the following methods

Method Description
GET_SCOREATTRIBUTES() Getter for SCOREATTRIBUTES

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.

Accessible with the following methods

Method Description
GET_FEEDBACKTOKEN() Getter for FEEDBACKTOKEN, with configurable default
ASK_FEEDBACKTOKEN() Getter for FEEDBACKTOKEN w/ exceptions if field has no value
HAS_FEEDBACKTOKEN() Determine if FEEDBACKTOKEN has a value

TableExcerpt

An excerpt from a table within a document.

Accessible with the following methods

Method Description
GET_TABLEEXCERPT() Getter for TABLEEXCERPT

CollapsedResultDetail

Provides details about a collapsed group of search results.

Accessible with the following methods

Method Description
GET_COLLAPSEDRESULTDETAIL() Getter for COLLAPSEDRESULTDETAIL

Public Local Types In This Class

Internal table types, representing arrays and maps of this class, are defined as local types:

TT_QUERYRESULTITEMLIST

TYPES TT_QUERYRESULTITEMLIST TYPE STANDARD TABLE OF REF TO /AWS1/CL_KNDQUERYRESULTITEM WITH DEFAULT KEY
.