forked from opensearch-project/flow-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jackie Han <[email protected]>
- Loading branch information
1 parent
693b71d
commit 09b23b7
Showing
3 changed files
with
42 additions
and
0 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
40 changes: 40 additions & 0 deletions
40
src/main/java/org/opensearch/flowframework/workflow/RankSearchResultStep.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,40 @@ | ||
package org.opensearch.flowframework.workflow; | ||
|
||
import org.opensearch.action.support.PlainActionFuture; | ||
|
||
import java.util.Map; | ||
|
||
public class RankSearchResultStep implements WorkflowStep { | ||
|
||
public RankSearchResultStep() {} | ||
|
||
public static final String NAME = "rank_search_result"; | ||
/** | ||
* Triggers the actual processing of the building block. | ||
* | ||
* @param currentNodeId The id of the node executing this step | ||
* @param currentNodeInputs Input params and content for this node, from workflow parsing | ||
* @param outputs WorkflowData content of previous steps. | ||
* @param previousNodeInputs Input params for this node that come from previous steps | ||
* @return A CompletableFuture of the building block. This block should return immediately, but not be completed until the step executes, containing either the step's output data or {@link WorkflowData#EMPTY} which may be passed to follow-on steps. | ||
*/ | ||
@Override | ||
public PlainActionFuture<WorkflowData> execute(String currentNodeId, | ||
WorkflowData currentNodeInputs, | ||
Map<String, WorkflowData> outputs, | ||
Map<String, String> previousNodeInputs) { | ||
PlainActionFuture<WorkflowData> future = PlainActionFuture.newFuture(); | ||
future.onResponse(WorkflowData.EMPTY); | ||
return future; | ||
} | ||
|
||
/** | ||
* Gets the name of the workflow step. | ||
* | ||
* @return the name of this workflow step. | ||
*/ | ||
@Override | ||
public String getName() { | ||
return NAME; | ||
} | ||
} |
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