-
Notifications
You must be signed in to change notification settings - Fork 707
feat: Add support for routing_keys in index_documents #3148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adding support for routing_keys in the index_documents API. The routing_keys is a optional argument when provided will compound the keys joining with _ and add as the routing key for indexing.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wvivek thanks for opening a PR. This looks like you are building parts of your application logic in the SDK. Is _routing key an accepted industry standard? Could you instead add the field to your documents before running index_documents
?
@kukushking The _routing is provided by OpenSearch to route the documents to specific index. By default OpenSearch uses the _id field to determine the shard. If _routing is provided as part of the indexing call, OpenSearch will make use of the value in the _routing to determine the shard. The search on the index also supports routing filters. |
Thanks @wvivek. Is below a convention for
|
Adding support for routing_keys in the index_documents API. The routing_keys is a optional argument when provided will compound the keys joining with _ and add as the routing key for indexing.
Feature or Bugfix
Detail
Relates
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.