-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
As described in the linked syntax document. This should be an extension to $setWindowFields.
Shorthand:
$minMaxScaler: <numeric expression>
Or extended:
$minMaxScaler: { input: <numeric expression>, min: <constant numeric expression>, max: <constant numeric expression> }
Using the defaults for min and max (0 and 1 respectively), given a sequence of numbers in the window
X = x0, x1, … xn, this will calculate:
minMaxScaler(xi) =(xi -min(X)) / (max(X) -min(X))
Now adding parameters smin and smax, for the fully general case we get:
minMaxScaler(xi, smin, smax) =((xi -min(X)) / (max(X) -min(X))*(smax-smin) +smin
You can see that these new terms just adjust the value between 0 and 1 to be in the domain (smin, smax)
- is depended on by
-
SERVER-94600 Add 'minMaxScalar' normalization option to $score stage
- Open
-
SERVER-94660 Test query shape for new hybrid scoring syntax like $sigmoid
- Open
-
SERVER-91279 Add example rank and score fusion tests which use $setWindowFields
- Backlog
- is duplicated by
-
SERVER-92122 Add a $minMaxScaler window function
- Closed
- is related to
-
SERVER-94598 Add $score stage for hybrid search
- Closed