summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2023-08-07 19:46:43 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2023-08-07 19:46:43 +0200
commitcc90c354846a7edb8b73c1bf4ad5aa90094a02bc (patch)
treeffe1147b79401cd15986ed0b4a855dbe3e1ec118
parent267f1fca29697f16e1908c3d8efd39837f7e08d8 (diff)
HibernateFunctionContributor: Use websearch_to_tsquery database function.
Change-Id: I753550e35d911a3adf428a2b789e5b30418248e1
-rw-r--r--src/main/java/eu/mulk/mulkcms2/common/hibernate/HibernateFunctionContributor.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/common/hibernate/HibernateFunctionContributor.java b/src/main/java/eu/mulk/mulkcms2/common/hibernate/HibernateFunctionContributor.java
index 1a7074d..e599c5c 100644
--- a/src/main/java/eu/mulk/mulkcms2/common/hibernate/HibernateFunctionContributor.java
+++ b/src/main/java/eu/mulk/mulkcms2/common/hibernate/HibernateFunctionContributor.java
@@ -17,8 +17,7 @@ public final class HibernateFunctionContributor implements FunctionContributor {
var functionRegistry = functionContributions.getFunctionRegistry();
functionRegistry
- .patternDescriptorBuilder(
- "post_matches_websearch", "(?1 @@ websearch_to_tsquery(language_regconfig(?2), ?3))")
+ .namedDescriptorBuilder("post_matches_websearch")
.setInvariantType(typeRegistry.resolve(BOOLEAN))
.setExactArgumentCount(3)
.setArgumentListSignature("(STRING searchTerms, STRING language, STRING queryText)")