Create Thesaurus and Query
A 3-step recipe with Amazon Kendra. We can help you get access.
Recipe · 3 steps
Create Thesaurus and Query
with Amazon Kendra
Create a thesaurus, confirm it via ListThesauri, then run a synonym-aware query.
- Create the custom synonym thesaurus from the supplied Solr-format S3 file so the index can expand queries across the defined synonyms.
- List the index thesauri to confirm the newly created thesaurus is registered. The spec provides no DescribeThesaurus operation, so listing is used in place of a per-thesaurus status poll.
- Run the search query against the index so synonym expansion from the new thesaurus is applied to the results.
What you'll need to have ready
- indexId: The identifier of the index to add the thesaurus to.
- thesaurusName: The name for the thesaurus.
- roleArn: The IAM role ARN granting Kendra access to the thesaurus file.
- sourceS3Path: The S3 path where the Solr-format thesaurus file sits.
- description: An optional description for the thesaurus.
- queryText: The search query to run once the thesaurus is registered.
For your developer
Arazzo workflow amazon-kendra:create-thesaurus-and-query, 3 operations: CreateThesaurus → ListThesauri → Query. Specs on APIs.io.