From 1924bd4b1286d8dbd761be0a7824a161ccaa99fd Mon Sep 17 00:00:00 2001
From: Étienne Loks <etienne.loks@iggdrasil.net>
Date: Wed, 1 Mar 2023 13:22:03 +0100
Subject: Free text search: add french_archeo thesaurus config

---
 postgres/french/create.sql | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 postgres/french/create.sql

(limited to 'postgres/french/create.sql')

diff --git a/postgres/french/create.sql b/postgres/french/create.sql
new file mode 100644
index 000000000..4f1b9ee0e
--- /dev/null
+++ b/postgres/french/create.sql
@@ -0,0 +1,23 @@
+DROP TEXT SEARCH CONFIGURATION IF EXISTS french_archeo;
+DROP TEXT SEARCH DICTIONARY IF EXISTS thesaurus_french_archeo;
+
+
+CREATE TEXT SEARCH CONFIGURATION french_archeo (
+   COPY = french
+);
+
+ALTER TEXT SEARCH CONFIGURATION french_archeo
+   DROP MAPPING FOR hword_asciipart;
+ALTER TEXT SEARCH CONFIGURATION french_archeo
+   DROP MAPPING FOR hword_part;
+
+
+CREATE TEXT SEARCH DICTIONARY thesaurus_french_archeo (
+    TEMPLATE = thesaurus,
+    DictFile = thesaurus_french_archeo,
+    Dictionary = pg_catalog.simple
+);
+
+ALTER TEXT SEARCH CONFIGURATION french_archeo
+   ALTER MAPPING FOR asciihword, asciiword, hword, word
+   WITH thesaurus_french_archeo, french_stem;
-- 
cgit v1.2.3

