Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 9c55602

Browse files
authored
Add reference to the bm25 match algo (#357)
1 parent b402f4f commit 9c55602

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/content/docs/extensions/full-text-search.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ In the following sections, we will build a full-text search index on the book ta
3535

3636
### Create FTS index
3737

38-
Kuzu provides a function `CREATE_FTS_INDEX` to create the full-text search index on a table:
38+
Kùzu provides a function `CREATE_FTS_INDEX` to create the full-text search index on a table:
3939

4040
```cypher
4141
CALL CREATE_FTS_INDEX('TABLE_NAME', 'INDEX_NAME', ['PROP1', 'PROP2', 'PROP3'...], OPTIONAL_PARAM1 := 'OPTIONAL_VAL1')
@@ -70,7 +70,7 @@ the index will be ready to use for full-text search.
7070

7171
### Query FTS index
7272

73-
Kuzu provides a table function `QUERY_FTS_INDEX` to query the FTS index on a table:
73+
Kùzu provides a table function `QUERY_FTS_INDEX` to query the FTS index on a table using the [Okapi BM25](https://en.wikipedia.org/wiki/Okapi_BM25) scoring algorithm:
7474

7575
```cypher
7676
CALL QUERY_FTS_INDEX(
@@ -90,6 +90,8 @@ The following optional parameters are supported:
9090
2. `K`: parameter controls the influence of term frequency saturation. It limits the effect of additional occurrences of a term within a document. Defaults to 1.2.
9191
3. `B`: parameter controls the degree of length normalization by adjusting the influence of document length. Defaults to 0.75.
9292

93+
Detailed explanation of k and b values can be found [there](https://learn.microsoft.com/en-us/azure/search/index-ranking-similarity)
94+
9395
The below example shows how to query books related to the `quantum machine` and order the books by their scores:
9496
```cypher
9597
CALL QUERY_FTS_INDEX('Book', 'book_index', 'quantum machine')

0 commit comments

Comments
 (0)