Skip to content

Commit 2301adf

Browse files
authored
Add SplitResponseProcessor to allowlist (#15393)
Signed-off-by: Daniel Widdis <widdis@gmail.com>
1 parent 0eb63bd commit 2301adf

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6767
- Fixed array field name omission in flat_object function for nested JSON ([#13620](https://github.com/opensearch-project/OpenSearch/pull/13620))
6868
- Fix range aggregation optimization ignoring top level queries ([#15194](https://github.com/opensearch-project/OpenSearch/pull/15194))
6969
- Fix incorrect parameter names in MinHash token filter configuration handling ([#15233](https://github.com/opensearch-project/OpenSearch/pull/15233))
70+
- Fix split response processor not included in allowlist ([#15393](https://github.com/opensearch-project/OpenSearch/pull/15393))
7071

7172
### Security
7273

modules/search-pipeline-common/src/main/java/org/opensearch/search/pipeline/common/SearchPipelineCommonModulePlugin.java

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ public Map<String, Processor.Factory<SearchResponseProcessor>> getResponseProces
9797
new TruncateHitsResponseProcessor.Factory(),
9898
CollapseResponseProcessor.TYPE,
9999
new CollapseResponseProcessor.Factory(),
100+
SplitResponseProcessor.TYPE,
101+
new SplitResponseProcessor.Factory(),
100102
SortResponseProcessor.TYPE,
101103
new SortResponseProcessor.Factory()
102104
)

modules/search-pipeline-common/src/test/java/org/opensearch/search/pipeline/common/SearchPipelineCommonModulePluginTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public void testResponseProcessorAllowlist() throws IOException {
4747
List.of("rename_field", "truncate_hits", "collapse"),
4848
SearchPipelineCommonModulePlugin::getResponseProcessors
4949
);
50+
runAllowlistTest(key, List.of("split", "sort"), SearchPipelineCommonModulePlugin::getResponseProcessors);
5051

5152
final IllegalArgumentException e = expectThrows(
5253
IllegalArgumentException.class,
@@ -82,7 +83,7 @@ public void testAllowlistNotSpecified() throws IOException {
8283
try (SearchPipelineCommonModulePlugin plugin = new SearchPipelineCommonModulePlugin()) {
8384
assertEquals(Set.of("oversample", "filter_query", "script"), plugin.getRequestProcessors(createParameters(settings)).keySet());
8485
assertEquals(
85-
Set.of("rename_field", "truncate_hits", "collapse", "sort"),
86+
Set.of("rename_field", "truncate_hits", "collapse", "split", "sort"),
8687
plugin.getResponseProcessors(createParameters(settings)).keySet()
8788
);
8889
assertEquals(Set.of(), plugin.getSearchPhaseResultsProcessors(createParameters(settings)).keySet());

0 commit comments

Comments
 (0)