File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
packages/mongodb-constants/src Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -883,6 +883,54 @@ const STAGE_OPERATORS = [
883
883
` ,
884
884
snippet : `{
885
885
size: \${1:number}
886
+ }` ,
887
+ } ,
888
+ {
889
+ name : '$scoreFusion' ,
890
+ value : '$scoreFusion' ,
891
+ label : '$scoreFusion' ,
892
+ outputStage : false ,
893
+ fullScan : false ,
894
+ firstStage : false ,
895
+ score : 1 ,
896
+ env : [ ATLAS ] ,
897
+ meta : 'stage' ,
898
+ version : '8.2.0' ,
899
+ apiVersions : [ ] ,
900
+ namespaces : [ COLLECTION ] ,
901
+ description :
902
+ 'Combines multiple pipelines using relative score fusion to create hybrid search results.' ,
903
+ comment : `/**
904
+ * input.pipelines: Required. Map from name to input pipeline. Each pipeline must be operating on the same collection. Minimum of one pipeline.
905
+ * input.normalization: Required. Normalizes the score to the range 0 to 1 before combining the results. Value can be none, sigmoid or minMaxScaler.
906
+ * combination.weights: Optional. Map from pipeline name to numbers (non-negative). If unspecified, default weight is 1 for each pipeline.
907
+ * combination.method: Optional. Specifies method for combining scores. Value can be avg or expression. Default is avg.
908
+ * combination.expression: Optional. This is the custom expression that is used when combination.method is set to expression.
909
+ * scoreDetails: Optional. Default false. Set to true to include detailed scoring information.
910
+ */
911
+ ` ,
912
+ snippet : `{
913
+ input: {
914
+ pipelines: {
915
+ \${1:searchPipeline}: [
916
+ {$search: {\${2:searchStage}}},
917
+ {$limit: \${3:limit}}
918
+ ],
919
+ \${4:vectorPipeline}: [
920
+ {$vectorSearch: {\${5:vectorSearchStage}}}
921
+ ]
922
+ },
923
+ normalization: '\${6:none|sigmoid|minMaxScaler}'
924
+ },
925
+ combination: {
926
+ weights: {
927
+ \${7:searchPipeline}: \${8:number},
928
+ \${9:vectorPipeline}: \${10:number}
929
+ },
930
+ method: '\${11:avg|expression}',
931
+ expression: '\${12:expression}'
932
+ },
933
+ scoreDetails: \${13:false}
886
934
}` ,
887
935
} ,
888
936
{
You can’t perform that action at this time.
0 commit comments