简体   繁体   中英

AWS Kendra get _document_body attribute

I'm trying to query aws kendra but I need to have the document_body in the ResultItem response.

I tried with the RequestedDocumentAttributes param in the QueryCommand but the result still not contains the document body.

const command = new QueryCommand({
    IndexId: 'xxxxxxx',
    QueryText: "How to connect to ec2?",
    RequestedDocumentAttributes: [
        "_document_body",
        "_data_source_id",
        "_last_updated_at"
    ]    
});

Any suggestion?

_document_body is a special field and Kendra currently does not support returning its entire value in the Query response. Kendra does returns a DocumentExcept for each document ResultItem, which contains the most relevant extract of text in the _document_body.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM