-
-
Save KyMidd/3dc7bdbc7308f433d8580e856acd6e02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > awscurl --region us-west-2 \ | |
| --service aoss \ | |
| "https://(Your open search URL).us-west-2.aoss.amazonaws.com/bedrock-knowledge-base-default-index/_search" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{ | |
| "size": 0, | |
| "aggs": { | |
| "unique_urls": { | |
| "composite": { | |
| "size": 100, | |
| "sources": [ | |
| { | |
| "url": { | |
| "terms": { | |
| "field": "x-amz-bedrock-kb-source-uri.keyword" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }' | jq '.aggregations.unique_urls.buckets[].key.url' | |
| "https://letsdodevops.atlassian.net/wiki/pages/Page1" | |
| "https://letsdodevops.atlassian.net/wiki/pages/Page2" | |
| "https://letsdodevops.atlassian.net/wiki/pages/Page3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment