From 6615c5bb604120e0a57a8c652a0c07abb6f43fba Mon Sep 17 00:00:00 2001
From: Fridolin Somers <fridolin.somers@biblibre.com>
Date: Thu, 4 Dec 2014 15:20:29 +0100
Subject: [PATCH] Bug 11927 - Add greek to word-phrase-utf.chr
Add greek support in word-phrase-utf.chr for searching in a Greek catalog (it can also contain latin records).
Developped in collaboration with Giannis Kourmoulis <ikourmou@lib.auth.gr>
Test plan :
- Install using CHR zebra indexing
- Index a greek catalog
- Look for results with mixed uppercase, lowercase and diacritics in title
---
etc/zebradb/etc/word-phrase-utf.chr | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/etc/zebradb/etc/word-phrase-utf.chr b/etc/zebradb/etc/word-phrase-utf.chr
index b773db8..6ef8952 100644
--- a/etc/zebradb/etc/word-phrase-utf.chr
+++ b/etc/zebradb/etc/word-phrase-utf.chr
@@ -1,12 +1,12 @@
-# Generic search equivanence character map for Latin languages (English, French, etc.)
+# Generic character map for Latin and Greek characters.
# Define the basic value-set. *Beware* of changing this without re-indexing
# your databases.
encoding utf-8
# basic character set
-lowercase {0-9}{a-z}
-uppercase {0-9}{A-Z}
+lowercase {0-9}{a-z}αβγδεζηθικλμνξοπρστυφχψω
+uppercase {0-9}{A-Z}ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
# Breaking characters
space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’{\x88-\x89}{\x98-\x9C}
@@ -26,6 +26,14 @@ equivalent ëē(ee)
equivalent oóòõôŏǫȯőǒȍȏ
equivalent Œœöø(oe)
equivalent ō(oo)
+equivalent αάΑΆ(α΄)(Α΄)
+equivalent εέΕΈ(ε΄)(Ε΄)
+equivalent ιίϊΙΊΪ(ι΄)(Ι΄)
+equivalent ηήΗΉ(η΄)(Η΄)
+equivalent οόΟΌ(ο΄)(Ο΄)
+equivalent υύϋΥΎΫ(υ΄)(Υ΄)
+equivalent ωώΩΏ(ω΄)(Ω΄)
+equivalent Σσς
# Supplemental mappings
# mapping diacritics to plain ASCII
@@ -284,6 +292,24 @@ map Ý y
map ɏ y
map Ɏ y
+## mapping diacritics to plain on greek characters
+map ά α
+map Ά α
+map έ ε
+map Έ ε
+map ί ι
+map Ί ι
+map ή η
+map Ή η
+map ό ο
+map Ό ο
+map ύ υ
+map Ύ υ
+map ώ ω
+map Ώ ω
+map Σ σ
+map Σ ς
+
# mapping blank string
map (^impr\s) @
map (^impr\.) @
--
1.9.1