From: Jan Szejko <janek37@gmail.com>
Date: Mon, 5 Mar 2018 16:09:41 +0000 (+0100)
Subject: enable search without diacritics
X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/d4509c229c8e084c0b6e49e594bd7cb420b3a5d1?ds=sidebyside

enable search without diacritics
---

diff --git a/doc/schema.xml b/doc/schema.xml
index 1e9b808fa..289a09aa8 100644
--- a/doc/schema.xml
+++ b/doc/schema.xml
@@ -295,7 +295,14 @@
 
     <!-- Polish -->
     <fieldType name="text_pl" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
-      <analyzer> 
+      <analyzer type="index">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pl.txt" format="snowball"/>
+        <filter class="solr.MorfologikFilterFactory" dictionary="morfologik/stemming/polish/polish.dict" />
+        <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="true" />
+      </analyzer>
+      <analyzer type="query">
         <tokenizer class="solr.StandardTokenizerFactory"/>
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pl.txt" format="snowball"/>
@@ -304,7 +311,13 @@
     </fieldType>
 
     <fieldType name="text_pl_nonstop" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
-      <analyzer>
+      <analyzer type="index">
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.MorfologikFilterFactory" dictionary="morfologik/stemming/polish/polish.dict" />
+        <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="true" />
+      </analyzer>
+      <analyzer type="query">
         <tokenizer class="solr.StandardTokenizerFactory"/>
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.MorfologikFilterFactory" dictionary="morfologik/stemming/polish/polish.dict" />