Update facet rule to implemented hardcoded punctuation trim
authorDennis Schafroth <dennis@indexdata.com>
Wed, 16 May 2012 12:12:47 +0000 (14:12 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Wed, 16 May 2012 12:12:47 +0000 (14:12 +0200)
test/test_facets.cfg
test/test_icu.cfg
test/test_limit_limitmap.cfg

index 9fce24c..d1ae26e 100644 (file)
@@ -5,6 +5,14 @@
     <listen port="9763"/>
     <proxy host="localhost"/>
     
+    <icu_chain id="punctuation-trim" locale="en">
+      <transliterate>[[:WhiteSpace:][,.-]]* } [$] > ;</transliterate>
+    </icu_chain>
+
+    <icu_chain id="facet" locale="en">
+      <transliterate>[[:WhiteSpace:][,.!;]]* } [$] > ;</transliterate>
+    </icu_chain>
+
     <service>
       <include src="z3950_indexdata_com_marc.xml"/>
       <metadata name="url" merge="unique"/>
@@ -13,7 +21,7 @@
       <metadata name="isbn"/>
       <metadata name="date" brief="yes" sortkey="numeric" type="year" merge="range"
                termlist="yes"/>
-      <metadata name="author" brief="yes" termlist="yes" merge="longest" rank="2" mergekey="optional" />
+      <metadata name="author" brief="yes" termlist="yes" merge="longest" rank="2" mergekey="optional" facetrule="punctuation-trim" />
       <metadata name="subject" merge="unique" termlist="yes" rank="3"/>
       <metadata name="id"/>
       <metadata name="lccn" merge="unique"/>
index fcab6fa..0d5be21 100644 (file)
@@ -43,7 +43,7 @@
       <display/> 
 -->
       <transliterate>
-       [,]* } [$] > ;
+       [.,]* } [$] > ;
       </transliterate>
     </icu_chain>
 
index 9b12a05..a8c2974 100644 (file)
@@ -4,6 +4,10 @@
   <server>
     <listen port="9763"/>
     <proxy host="localhost"/>
+
+    <icu_chain id="facet" locale="en">
+      <transliterate>[[:WhiteSpace:][,.!;]]* } [$] > ;</transliterate>
+    </icu_chain>
   </server>
   
 </pazpar2>