How to enhance a document in Amazon Kendra

0

Hello, I am using Kendra as the indexer for a document processing solution. Initially when a document is scanned it is added to Kendra using BatchPutDocument, however at a later point I would like to "tag" or "enrich" the document with more attributes, so I can search that same document using these new attributes.

I don't see any updateDocument API available, the other option was to get the document, add attributes to it, delete the current entry with BatchDeleteDocument and upload the new enriched one; however the Query or Retrieve API do not return the complete document that was initially uploaded to Kendra with BatchPutDocument, so there is potential for losing valuable data.

Any ideas or suggestions are appreciated. Thank you.

已提問 6 個月前檢視次數 273 次
1 個回答
0

Hi Juan,

To add new custom fields in your index you can use the UpdateIndex API with theDocumentMetadataConfigurationUpdates parameter. This allows you to update custom attribute relevant to your documents. Once you have updated the index configuration to include the new fields, re-upload the documents using the BatchPutDocument API, including the new attributes in the Attributes section of your documents.

Also depending on where your documents are stored, If your documents are in an S3 bucket, you can add new attributes through metadata JSON files in the S3 data source.

Thanks, Ayman

AWS
aykazmi
已回答 5 個月前
  • Thanks for your reply Ayman, one clarification thou, when you refer to re-upload the documents using BatchPutDocument API, do you mean calling the API again only with the new attributes? or deleting the document and performing a new upload with all the document information including new attributes?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南