OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

add multitenant support for search workloads

Open kaushalmahi12 opened this issue 9 months ago • 4 comments

Description

This PR add support to add labels to support multitenancy in opensearch. These labels can be consumed by any feature e,g; Query Sandboxing, Query Insights, Slow logs etc;

Sample search request body to pass these labels

curl -X GET "localhost:9200/my-index-*/_search?size=1000&pretty" -H 'Content-Type: application/json' -d '{
  "query" : {
  },
  "labels": {
    "tenant": "analytics"
  }
}'

Related Issues

https://github.com/opensearch-project/OpenSearch/issues/12342

Check List

  • [X] New functionality includes testing.
    • [X] All tests pass
  • [] New functionality has been documented.
    • [X] New functionality has javadoc added
  • [ ] API changes companion pull request created.
  • [ ] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • [X] Commits are signed per the DCO using --signoff
  • [ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • [ ] Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

kaushalmahi12 avatar May 16 '24 17:05 kaushalmahi12