Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 147aa14

Browse files
Simran-Bnerpaula
andauthored
BM25() text length scaling 0..1 (#1356)
* BM25() text length scaling 0..1 * Text term frequency scaling >= 0 * nit: non-negative (shouldn't be -0.0) * Apply to 3.12 --------- Co-authored-by: Paula Mihu <[email protected]>
1 parent 4804e08 commit 147aa14

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

3.10/aql/functions-arangosearch.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,9 +1178,13 @@ Sorts documents using the
11781178

11791179
- **doc** (document): must be emitted by `FOR ... IN viewName`
11801180
- **k** (number, _optional_): calibrates the text term frequency scaling.
1181+
The value needs to be non-negative (`0.0` or higher), or the returned
1182+
score is an undefined value that may cause unpredictable results.
11811183
The default is `1.2`. A `k` value of `0` corresponds to a binary model
11821184
(no term frequency), and a large value corresponds to using raw term frequency
11831185
- **b** (number, _optional_): determines the scaling by the total text length.
1186+
The value needs to be between `0.0` and `1.0` (inclusive), or the returned
1187+
score is an undefined value that may cause unpredictable results.
11841188
The default is `0.75`. At the extreme values of the coefficient `b`, BM25
11851189
turns into the ranking functions known as:
11861190
- BM11 for `b` = `1` (corresponds to fully scaling the term weight by the

3.11/aql/functions-arangosearch.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,9 +1178,13 @@ Sorts documents using the
11781178

11791179
- **doc** (document): must be emitted by `FOR ... IN viewName`
11801180
- **k** (number, _optional_): calibrates the text term frequency scaling.
1181+
The value needs to be non-negative (`0.0` or higher), or the returned
1182+
score is an undefined value that may cause unpredictable results.
11811183
The default is `1.2`. A `k` value of `0` corresponds to a binary model
11821184
(no term frequency), and a large value corresponds to using raw term frequency
11831185
- **b** (number, _optional_): determines the scaling by the total text length.
1186+
The value needs to be between `0.0` and `1.0` (inclusive), or the returned
1187+
score is an undefined value that may cause unpredictable results.
11841188
The default is `0.75`. At the extreme values of the coefficient `b`, BM25
11851189
turns into the ranking functions known as:
11861190
- BM11 for `b` = `1` (corresponds to fully scaling the term weight by the

3.12/aql/functions-arangosearch.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,9 +1178,13 @@ Sorts documents using the
11781178

11791179
- **doc** (document): must be emitted by `FOR ... IN viewName`
11801180
- **k** (number, _optional_): calibrates the text term frequency scaling.
1181+
The value needs to be non-negative (`0.0` or higher), or the returned
1182+
score is an undefined value that may cause unpredictable results.
11811183
The default is `1.2`. A `k` value of `0` corresponds to a binary model
11821184
(no term frequency), and a large value corresponds to using raw term frequency
11831185
- **b** (number, _optional_): determines the scaling by the total text length.
1186+
The value needs to be between `0.0` and `1.0` (inclusive), or the returned
1187+
score is an undefined value that may cause unpredictable results.
11841188
The default is `0.75`. At the extreme values of the coefficient `b`, BM25
11851189
turns into the ranking functions known as:
11861190
- BM11 for `b` = `1` (corresponds to fully scaling the term weight by the

3.9/aql/functions-arangosearch.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,9 +1067,13 @@ Sorts documents using the
10671067

10681068
- **doc** (document): must be emitted by `FOR ... IN viewName`
10691069
- **k** (number, _optional_): calibrates the text term frequency scaling.
1070+
The value needs to be non-negative (`0.0` or higher), or the returned
1071+
score is an undefined value that may cause unpredictable results.
10701072
The default is `1.2`. A *k* value of `0` corresponds to a binary model
10711073
(no term frequency), and a large value corresponds to using raw term frequency
10721074
- **b** (number, _optional_): determines the scaling by the total text length.
1075+
The value needs to be between `0.0` and `1.0` (inclusive), or the returned
1076+
score is an undefined value that may cause unpredictable results.
10731077
The default is `0.75`. At the extreme values of the coefficient *b*, BM25
10741078
turns into the ranking functions known as:
10751079
- BM11 for *b* = `1` (corresponds to fully scaling the term weight by the

0 commit comments

Comments
 (0)