From 7b36b7f9dc3db09c8288583a63c5534ba9a97871 Mon Sep 17 00:00:00 2001
From: Matthias Schur <107557548+MattSchur@users.noreply.github.com>
Date: Mon, 7 Sep 2026 12:47:58 +0200
Subject: [PATCH 1/3] Fuzzy Search
---
guides/services/served-ootb.md | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/guides/services/served-ootb.md b/guides/services/served-ootb.md
index 2c9a132155..a9576adb02 100644
--- a/guides/services/served-ootb.md
+++ b/guides/services/served-ootb.md
@@ -312,9 +312,7 @@ To illustrate the above:
### Fuzzy Search on SAP HANA Cloud {#fuzzy-search}
-> Prerequisite: For CAP Java, you need to run in [`HEX` optimization mode](../../java/cqn-services/persistence-services#sql-optimization-mode) on SAP HANA Cloud and enable cds.sql.hana.search.fuzzy = true
-
-Fuzzy search is a fault-tolerant search feature of SAP HANA Cloud, which returns records even if the search term contains additional characters, is missing characters, or has typographical errors.
+Fuzzy search is a fault-tolerant search feature of SAP HANA Cloud, which returns records even if the search term contains additional characters, is missing characters, or has typographical errors. CAP automatically sorts fuzzy search results by relevance (match score), if no explicit `$orderby` is specified.
You can configure the fuzziness in the range `[0.0, 1.0]`. The value 1.0 enforces exact search.
@@ -349,7 +347,13 @@ When using wildcards in search terms, an *exact pattern search* is performed.
Supported wildcards are '*' matching zero or more characters and '?' matching a single character. You can escape wildcards using '\\'.
:::
+::: tip Enable Fuzzy Search in CAP Java `4.9`
+CAP Java `5.x` comes with fuzzy search enabled by default, in CAP Java `4.9`, you need to run in [`HEX` optimization mode](../../java/cqn-services/persistence-services#sql-optimization-mode) on SAP HANA Cloud and enable cds.sql.hana.search.fuzzy = true
+:::
+::: info Relevance sorting doesn't consider to-many associations
+Elements from to-many associated entities don't contribute to the sort order. Strong matches from them appear after weaker matches directly from the searched entity.
+:::
## Pagination & Sorting
From 6a4d556e159aced8973741b84b83c001cdfc0ce8 Mon Sep 17 00:00:00 2001
From: Mahati Shankar <93712176+smahati@users.noreply.github.com>
Date: Mon, 7 Sep 2026 13:21:38 +0200
Subject: [PATCH 2/3] cosmetics
---
guides/services/served-ootb.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guides/services/served-ootb.md b/guides/services/served-ootb.md
index a9576adb02..b3039a11d6 100644
--- a/guides/services/served-ootb.md
+++ b/guides/services/served-ootb.md
@@ -348,7 +348,7 @@ Supported wildcards are '*' matching zero or more characters and '?' matching a
:::
::: tip Enable Fuzzy Search in CAP Java `4.9`
-CAP Java `5.x` comes with fuzzy search enabled by default, in CAP Java `4.9`, you need to run in [`HEX` optimization mode](../../java/cqn-services/persistence-services#sql-optimization-mode) on SAP HANA Cloud and enable cds.sql.hana.search.fuzzy = true
+CAP Java `5.x` comes with fuzzy search enabled by default, in CAP Java `4.9` it can be enabled by first enabling [`HEX` optimization mode](../../java/cqn-services/persistence-services#sql-optimization-mode) on SAP HANA Cloud and then setting cds.sql.hana.search.fuzzy = true.
:::
::: info Relevance sorting doesn't consider to-many associations
From 2836b0261aaec2fb5f6f92f0591e75703c57bb39 Mon Sep 17 00:00:00 2001
From: D045778
Date: Mon, 7 Sep 2026 16:00:46 +0200
Subject: [PATCH 3/3] node specific config options
---
guides/services/served-ootb.md | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/guides/services/served-ootb.md b/guides/services/served-ootb.md
index b3039a11d6..00aff8b778 100644
--- a/guides/services/served-ootb.md
+++ b/guides/services/served-ootb.md
@@ -317,9 +317,14 @@ Fuzzy search is a fault-tolerant search feature of SAP HANA Cloud, which returns
You can configure the fuzziness in the range `[0.0, 1.0]`. The value 1.0 enforces exact search.
- Java: cds.sql.hana.search.fuzzinessThreshold = 0.8
-- Node.js:cds.hana.fuzzy = 0.7(1)
-
-(1) If set to `false`, fuzzy search is disabled and falls back to a case insensitive substring search.
+- Node.js:
+ |Property|Effect|
+ |---|---|
+ |cds.hana.fuzzy = 0.7 | global fuzziness threshold(1) |
+ |cds.hana.fuzzy.ranked_search = false| opt-out of ranked search |
+ |cds.hana.fuzzy.score = 0.7| global fuzziness threshold |
+
+ (1) If set to `false`, fuzzy search is disabled and falls back to a case insensitive substring search.
Override the fuzziness for elements, using the `@Search.fuzzinessThreshold` annotation: