Skip to content

Commit 43ca263

Browse files
cwperksvinaykpud
authored andcommitted
Add new extensible method to DocRequest to specify type (opensearch-project#19313)
* Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent ad5e55c commit 43ca263

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
9696
- Publish transport-grpc-spi exposing QueryBuilderProtoConverter and QueryBuilderProtoConverterRegistry ([#18949](https://github.com/opensearch-project/OpenSearch/pull/18949))
9797
- Support system generated search pipeline. ([#19128](https://github.com/opensearch-project/OpenSearch/pull/19128))
9898
- Add `epoch_micros` date format ([#14669](https://github.com/opensearch-project/OpenSearch/issues/14669))
99-
- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799)
99+
- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799))
100100
- Upgrade opensearch-protobufs dependency to 0.13.0 and update transport-grpc module compatibility ([#19007](https://github.com/opensearch-project/OpenSearch/issues/19007))
101+
- Add new extensible method to DocRequest to specify type ([#19313](https://github.com/opensearch-project/OpenSearch/pull/19313))
101102

102103
### Changed
103104
- Refactor `if-else` chains to use `Java 17 pattern matching switch expressions`(([#18965](https://github.com/opensearch-project/OpenSearch/pull/18965))

server/src/main/java/org/opensearch/action/DocRequest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,18 @@ public interface DocRequest {
2828
* @return the id
2929
*/
3030
String id();
31+
32+
/**
33+
* Get the type of the request. This should match the action name prefix: i.e. indices:data/read/get
34+
*
35+
* Used in the context of resource sharing to specify the type of sharable resource.
36+
*
37+
* i.e. A report definition is sharable, so ActionRequests in the reporting plugin that
38+
* pertain to a single report definition would override this to specify "report_definition"
39+
*
40+
* @return the type
41+
*/
42+
default String type() {
43+
return "indices";
44+
}
3145
}

0 commit comments

Comments
 (0)