You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2006/02/28 02:07:52 UTC

svn commit: r381523 - in /incubator/solr/trunk/example: conf/schema.xml conf/stopwords.txt conf/synonyms.txt exampledocs/sd500.xml

Author: yonik
Date: Mon Feb 27 17:07:50 2006
New Revision: 381523

URL: http://svn.apache.org/viewcvs?rev=381523&view=rev
Log:
example config update

Modified:
    incubator/solr/trunk/example/conf/schema.xml
    incubator/solr/trunk/example/conf/stopwords.txt
    incubator/solr/trunk/example/conf/synonyms.txt
    incubator/solr/trunk/example/exampledocs/sd500.xml

Modified: incubator/solr/trunk/example/conf/schema.xml
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/example/conf/schema.xml?rev=381523&r1=381522&r2=381523&view=diff
==============================================================================
--- incubator/solr/trunk/example/conf/schema.xml (original)
+++ incubator/solr/trunk/example/conf/schema.xml Mon Feb 27 17:07:50 2006
@@ -108,7 +108,9 @@
     <fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
       <analyzer type="index">
           <tokenizer class="solr.WhitespaceTokenizerFactory"/>
-          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+          <!-- in this example, we will only use synonyms at query time
+          <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+          -->
           <filter class="solr.StopFilterFactory" ignoreCase="true"/>
           <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
           <filter class="solr.LowerCaseFilterFactory"/>
@@ -116,7 +118,7 @@
       </analyzer>
       <analyzer type="query">
           <tokenizer class="solr.WhitespaceTokenizerFactory"/>
-          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
           <filter class="solr.StopFilterFactory" ignoreCase="true"/>
           <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
           <filter class="solr.LowerCaseFilterFactory"/>

Modified: incubator/solr/trunk/example/conf/stopwords.txt
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/example/conf/stopwords.txt?rev=381523&r1=381522&r2=381523&view=diff
==============================================================================
--- incubator/solr/trunk/example/conf/stopwords.txt (original)
+++ incubator/solr/trunk/example/conf/stopwords.txt Mon Feb 27 17:07:50 2006
@@ -1,2 +1,41 @@
+#a couple of test stopwords to test that the words are really being configured
+#from this file:
 stopworda
 stopwordb
+
+#Standard english stop words taken from Lucene's StopAnalyzer
+an
+and
+are
+as
+at
+be
+but
+by
+for
+if
+in
+into
+is
+it
+no
+not
+of
+on
+or
+s
+such
+t
+that
+the
+their
+then
+there
+these
+they
+this
+to
+was
+will
+with
+

Modified: incubator/solr/trunk/example/conf/synonyms.txt
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/example/conf/synonyms.txt?rev=381523&r1=381522&r2=381523&view=diff
==============================================================================
--- incubator/solr/trunk/example/conf/synonyms.txt (original)
+++ incubator/solr/trunk/example/conf/synonyms.txt Mon Feb 27 17:07:50 2006
@@ -1,6 +1,18 @@
+
+#some test synonym mappings for things unlikely to appear in input text
 aaa => aaaa
 bbb => bbbb1 bbbb2
 ccc => cccc1,cccc2
 a\=>a => b\=>b
 a\,a => b\,b
 fooaaa,baraaa,bazaaa
+
+#synonyms, for our purposes
+GB,gib,gigabyte,gigabytes
+MB,mib,megabyte,megabytes
+#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
+#after us won't split it into two words.
+
+#spelling correction
+pixima => pixma
+

Modified: incubator/solr/trunk/example/exampledocs/sd500.xml
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/example/exampledocs/sd500.xml?rev=381523&r1=381522&r2=381523&view=diff
==============================================================================
--- incubator/solr/trunk/example/exampledocs/sd500.xml (original)
+++ incubator/solr/trunk/example/exampledocs/sd500.xml Mon Feb 27 17:07:50 2006
@@ -1,6 +1,6 @@
 <add><doc>
   <field name="id">9885A004</field>
-  <field name="name">Canon Powershot SD500</field>
+  <field name="name">Canon PowerShot SD500</field>
   <field name="manu">Canon Inc.</field>
   <field name="cat">electronics</field>
   <field name="cat">camera</field>