Using rule instead of hardcoded trailing punctuation removal
authorDennis Schafroth <dennis@indexdata.com>
Wed, 9 May 2012 14:34:49 +0000 (16:34 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Wed, 9 May 2012 14:34:49 +0000 (16:34 +0200)
test/test_icu.cfg

index 75e8842..fcab6fa 100644 (file)
     </icu_chain>
     
     <icu_chain id="facet" locale="en">
-      <casemap rule="l"/>
+      <transliterate>[[:WhiteSpace:][,.!;]]* } [$] > ;</transliterate>
     </icu_chain>
 
     <icu_chain id="mychain" locale="en">
       <display/>
-      <casemap rule="l"/>
+      <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
     </icu_chain>
-    
+
+    <icu_chain id="facet-author" locale="en">
+<!--
+      <display/> 
+-->
+      <transliterate>
+       [,]* } [$] > ;
+      </transliterate>
+    </icu_chain>
+
     <service>
       <timeout session="30" z3950_operation="20" z3950_session="40"/>
       <metadata name="url" merge="unique"/>
@@ -47,7 +56,7 @@
       <metadata name="date" brief="yes" sortkey="numeric" type="year" merge="range"
                termlist="yes"/>
       <metadata name="author" brief="yes" termlist="yes"
-                merge="longest" rank="2" facetrule="mychain"/>
+                merge="longest" rank="2" facetrule="facet-author"/>
       <metadata name="subject" merge="unique" termlist="yes" rank="3"/>
       <metadata name="id"/>
       <metadata name="lccn" merge="unique"/>