You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/elasticsearch/rest-apis/retrievers.md
+16-9Lines changed: 16 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,8 +263,21 @@ A retriever that normalizes and linearly combines the scores of other retrievers
263
263
264
264
A list of the sub-retrievers' configuration, that we will take into account and whose result sets we will merge through a weighted sum. Each configuration can have a different weight and normalization depending on the specified retriever.
265
265
266
+
`normalizer`
267
+
: (Optional, String)
268
+
269
+
Specifies a normalizer to be applied to all sub-retrievers. This provides a simple way to configure normalization for all retrievers at once.
270
+
271
+
The `normalizer` can be specified at the top level, at the per-retriever level, or both, with the following rules:
272
+
273
+
* If only the top-level `normalizer` is specified, it applies to all sub-retrievers.
274
+
* If both a top-level and a per-retriever `normalizer` are specified, the per-retriever normalizer must be identical to the top-level one. If they differ, the request will fail.
275
+
* If only per-retriever normalizers are specified, they can be different for each sub-retriever.
276
+
* If no normalizer is specified at any level, no normalization is applied.
266
277
267
-
Each entry specifies the following parameters:
278
+
Available values are: `minmax`, `l2_norm`, and `none`. Defaults to `none`.
279
+
280
+
Each entry in the `retrievers` array specifies the following parameters:
268
281
269
282
`retriever`
270
283
: (Required, a `retriever` object)
@@ -279,19 +292,13 @@ Each entry specifies the following parameters:
279
292
`normalizer`
280
293
: (Optional, String)
281
294
282
-
- Specifies how we will normalize the retriever’s scores, before applying the specified `weight`. Available values are: `minmax`, `l2_norm`, and `none`. Defaults to `none`.
295
+
Specifies how we will normalize this specific retriever’s scores, before applying the specified `weight`. If a top-level `normalizer` is also specified, this normalizer must be the same. Available values are: `minmax`, `l2_norm`, and `none`. Defaults to `none`.
283
296
284
297
* `none`
285
298
* `minmax` : A `MinMaxScoreNormalizer` that normalizes scores based on the following formula
286
-
287
-
```
288
-
score = (score - min) / (max - min)
289
-
```
290
-
299
+
`score = (score - min) / (max - min)`
291
300
* `l2_norm` : An `L2ScoreNormalizer` that normalizes scores using the L2 norm of the score values.
292
301
293
-
See also [this hybrid search example](docs-content://solutions/search/retrievers-examples.md#retrievers-examples-linear-retriever) using a linear retriever on how to independently configure and apply normalizers to retrievers.
0 commit comments