Skip to content

Query

Source: src/AWS/Kendra/Query.ts

Runtime binding for the Query operation (IAM action kendra:Query), scoped to one Index.

Searches the index with a natural-language query — returns ranked answers, FAQ matches, and document results, optionally filtered on document attributes and the querying user’s context. Provide the implementation with Effect.provide(AWS.Kendra.QueryHttp).

const query = yield* AWS.Kendra.Query(index);
const results = yield* query({ QueryText: "how do I configure SSO?" });
for (const item of results.ResultItems ?? []) {
console.log(item.Type, item.DocumentTitle?.Text);
}