From d5c296126912dddef7b5f1875d20414f2f90ccba Mon Sep 17 00:00:00 2001 From: Tokesh Date: Wed, 7 Feb 2024 21:56:00 +0600 Subject: [PATCH] adding map for main structure, main search pipeline API spces, phase result processor Signed-off-by: Tokesh --- model/search_pipeline/get/operations.smithy | 11 +++++++ model/search_pipeline/get/structures.smithy | 13 +++++++- model/search_pipeline/search_pipeline.smithy | 32 +++++++++++++++++++- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/model/search_pipeline/get/operations.smithy b/model/search_pipeline/get/operations.smithy index 59ae56eaa..5029c140a 100644 --- a/model/search_pipeline/get/operations.smithy +++ b/model/search_pipeline/get/operations.smithy @@ -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 diff --git a/model/search_pipeline/get/structures.smithy b/model/search_pipeline/get/structures.smithy index 4ca0ab11b..ab90164c7 100644 --- a/model/search_pipeline/get/structures.smithy +++ b/model/search_pipeline/get/structures.smithy @@ -7,6 +7,16 @@ $version: "2" namespace OpenSearch +@input +structure GetSearchPipelines_Input { +} + +@output +structure GetSearchPipelines_Output { + @httpPayload + content: SearchPipelineMap +} + @input structure GetSearchPipeline_Input { @required @@ -14,7 +24,8 @@ structure GetSearchPipeline_Input { pipeline: String, } +@output structure GetSearchPipeline_Output { @httpPayload - content: SearchPipelineStructure + content: SearchPipelineMap } diff --git a/model/search_pipeline/search_pipeline.smithy b/model/search_pipeline/search_pipeline.smithy index 9d1ccdf91..6ae20ed62 100644 --- a/model/search_pipeline/search_pipeline.smithy +++ b/model/search_pipeline/search_pipeline.smithy @@ -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 { @@ -21,6 +27,9 @@ list ResponseProcessorsList { member: RequestProcessors } +list PhaseResultsProcessorsList { + member: PhaseResultsProcessors +} structure RequestProcessors { filter_query: FilterQuery, @@ -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,