generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
Is your feature request related to a problem?
I was updating our TS code to @opensearch-project/opensearch
3.5.1 when I ran into an issue related to representing temporary search pipelines.
What solution would you like?
I would be great if a an API.Search_RequestBody
had a property search_pipeline
for a temporary score normalization processor used with hybrid queries.
What alternatives have you considered?
For now, I have made my own type:
export type HybridSearchRequest = API.Search_RequestBody & {
search_pipeline: {
phase_results_processors: any[];
};
};
I've considered using Types.SearchPipeline_Common.SearchPipelineStructure
, but parameters
in ScoreCombination
is not an object that could represent weights.
opensearch-js/api/_types/search_pipeline._common.d.ts
Lines 135 to 136 in 696baa1
export type ScoreCombination = { | |
parameters?: number[]; |
Do you have any additional context?
The search request looks like this:
{
"search_pipeline": {
"phase_results_processors": [
{
"normalization-processor": {
"normalization": {
"technique": "min_max"
},
"combination": {
"technique": "arithmetic_mean",
"parameters": {
"weights": [
0.7,
0.3
]
}
}
}
}
]
},
"query": {
"hybrid": {
"queries": [...]
}
}
}
Metadata
Metadata
Assignees
Labels
No labels