Skip to content

Commit

Permalink
adding map for main structure, main search pipeline API spces, phase …
Browse files Browse the repository at this point in the history
…result processor

Signed-off-by: Tokesh <[email protected]>
  • Loading branch information
Tokesh committed Feb 7, 2024
1 parent ceaaaad commit d5c2961
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
11 changes: 11 additions & 0 deletions model/search_pipeline/get/operations.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ namespace OpenSearch
"API Reference": "https://opensearch.org/docs/latest/search-plugins/search-pipelines/index/"
)

@xOperationGroup("search_pipeline.get")
@xVersionAdded("2.9")
@readonly
@suppress(["HttpUriConflict"])
@http(method: "GET", uri: "/_search/pipeline")
@documentation("Retrieves information about search pipelines.")
operation GetSearchPipelines {
input: GetSearchPipelines_Input,
output: GetSearchPipelines_Output
}

@xOperationGroup("search_pipeline.get")
@xVersionAdded("2.9")
@readonly
Expand Down
13 changes: 12 additions & 1 deletion model/search_pipeline/get/structures.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,25 @@
$version: "2"
namespace OpenSearch

@input
structure GetSearchPipelines_Input {
}

@output
structure GetSearchPipelines_Output {
@httpPayload
content: SearchPipelineMap
}

@input
structure GetSearchPipeline_Input {
@required
@httpLabel
pipeline: String,
}

@output
structure GetSearchPipeline_Output {
@httpPayload
content: SearchPipelineStructure
content: SearchPipelineMap
}
32 changes: 31 additions & 1 deletion model/search_pipeline/search_pipeline.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@
$version: "2"
namespace OpenSearch

map SearchPipelineMap{
key: String,
value: SearchPipelineStructure
}

structure SearchPipelineStructure{
version: Integer,
request_processors: RequestProcessorsList,
response_processors: ResponseProcessorsList
response_processors: ResponseProcessorsList,
phase_results_processors: PhaseResultsProcessorsList
}

list RequestProcessorsList {
Expand All @@ -21,6 +27,9 @@ list ResponseProcessorsList {
member: RequestProcessors
}

list PhaseResultsProcessorsList {
member: PhaseResultsProcessors
}

structure RequestProcessors {
filter_query: FilterQuery,
Expand All @@ -33,6 +42,27 @@ structure ResponseProcessors {
rename_field: RenameField,
}

structure PhaseResultsProcessors {
normalization: ScoreNormalization,
combination: ScoreCombination,
tag: String,
description: String,
ignore_failure: Boolean
}

structure ScoreNormalization{
technique: String
}

structure ScoreCombination{
technique: String,
parameters: ScoreWeights
}

list ScoreWeights{
member: Float
}

structure FilterQuery {
query: UserDefinedObjectStructure,
tag: String,
Expand Down

0 comments on commit d5c2961

Please sign in to comment.