Sends a retrieve or query request to Kendra and returns the top-k documents.
queryKendra(
query: string,
topK: number,
attributeFilter: AttributeFilter
): Promise<Document<Record<string, any>>[] | Document<__type>[]>| Name | Type | Description |
|---|---|---|
query* | string | The query to send to Kendra. |
topK* | number | The number of top documents to return. |
attributeFilter | AttributeFilter | Optional filter to apply when retrieving documents. |