forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create separate transport action for render search template action (o…
…pensearch-project#11170) Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 66d4e9e)
- Loading branch information
Showing
6 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ang-mustache/src/main/java/org/opensearch/script/mustache/RenderSearchTemplateAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.script.mustache; | ||
|
||
import org.opensearch.action.ActionType; | ||
|
||
public class RenderSearchTemplateAction extends ActionType<SearchTemplateResponse> { | ||
|
||
public static final RenderSearchTemplateAction INSTANCE = new RenderSearchTemplateAction(); | ||
public static final String NAME = "indices:data/read/search/template/render"; | ||
|
||
private RenderSearchTemplateAction() { | ||
super(NAME, SearchTemplateResponse::new); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...che/src/main/java/org/opensearch/script/mustache/TransportRenderSearchTemplateAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.script.mustache; | ||
|
||
import org.opensearch.action.support.ActionFilters; | ||
import org.opensearch.client.node.NodeClient; | ||
import org.opensearch.common.inject.Inject; | ||
import org.opensearch.core.xcontent.NamedXContentRegistry; | ||
import org.opensearch.script.ScriptService; | ||
import org.opensearch.transport.TransportService; | ||
|
||
public class TransportRenderSearchTemplateAction extends TransportSearchTemplateAction { | ||
|
||
@Inject | ||
public TransportRenderSearchTemplateAction( | ||
TransportService transportService, | ||
ActionFilters actionFilters, | ||
ScriptService scriptService, | ||
NamedXContentRegistry xContentRegistry, | ||
NodeClient client | ||
) { | ||
super(RenderSearchTemplateAction.NAME, transportService, actionFilters, scriptService, xContentRegistry, client); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters