From 370490289392eacc1197db3b3f5db664c3c62dc8 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 16 Sep 2025 15:29:34 -0400 Subject: [PATCH 1/3] Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins --- .../java/org/opensearch/action/DocRequest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/src/main/java/org/opensearch/action/DocRequest.java b/server/src/main/java/org/opensearch/action/DocRequest.java index a9e535406d446..060468bb06623 100644 --- a/server/src/main/java/org/opensearch/action/DocRequest.java +++ b/server/src/main/java/org/opensearch/action/DocRequest.java @@ -28,4 +28,18 @@ public interface DocRequest { * @return the id */ String id(); + + /** + * Get the type of the request. This should match the action name prefix: i.e. indices:data/read/get + * + * Used in the context of resource sharing to specify the type of sharable resource. + * + * i.e. A report definition is sharable, so ActionRequests in the reporting plugin that + * pertain to a single report definition would override this to specify "report_definition" + * + * @return the type + */ + default String type() { + return "indices"; + } } From 31470cf40122888b733f950e715ac0fc2d95b612 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 16 Sep 2025 15:39:28 -0400 Subject: [PATCH 2/3] Add CHANGELOG entry Signed-off-by: Craig Perkins --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24b8d7a255f88..7a89e2caef12e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Publish transport-grpc-spi exposing QueryBuilderProtoConverter and QueryBuilderProtoConverterRegistry ([#18949](https://github.com/opensearch-project/OpenSearch/pull/18949)) - Support system generated search pipeline. ([#19128](https://github.com/opensearch-project/OpenSearch/pull/19128)) - Add `epoch_micros` date format ([#14669](https://github.com/opensearch-project/OpenSearch/issues/14669)) -- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799) +- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799)) +- Add new extensible method to DocRequest to specify type ([#19313](https://github.com/opensearch-project/OpenSearch/pull/19313)) ### Changed - Refactor `if-else` chains to use `Java 17 pattern matching switch expressions`(([#18965](https://github.com/opensearch-project/OpenSearch/pull/18965)) From cb7692d248912c01e00378b4a3b917f276f11ecd Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 16 Sep 2025 15:40:52 -0400 Subject: [PATCH 3/3] Add CHANGELOG entry Signed-off-by: Craig Perkins --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14595d2c948ed..293387fa003df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,9 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Support system generated search pipeline. ([#19128](https://github.com/opensearch-project/OpenSearch/pull/19128)) - Add `epoch_micros` date format ([#14669](https://github.com/opensearch-project/OpenSearch/issues/14669)) - Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799)) -- Add new extensible method to DocRequest to specify type ([#19313](https://github.com/opensearch-project/OpenSearch/pull/19313)) -- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799) - Upgrade opensearch-protobufs dependency to 0.13.0 and update transport-grpc module compatibility ([#19007](https://github.com/opensearch-project/OpenSearch/issues/19007)) +- Add new extensible method to DocRequest to specify type ([#19313](https://github.com/opensearch-project/OpenSearch/pull/19313)) ### Changed - Refactor `if-else` chains to use `Java 17 pattern matching switch expressions`(([#18965](https://github.com/opensearch-project/OpenSearch/pull/18965))