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.

gefragt vor 5 Monaten265 Aufrufe
1 Antwort
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
beantwortet vor 4 Monaten
  • 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?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen