feat: Add support for routing_keys in index_documents#3148
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 |
kukushking
left a comment
There was a problem hiding this comment.
@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.