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.

질문됨 5달 전271회 조회
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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠