little schema cleanups

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@481036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-11-30 19:00:07 +00:00
parent 5cd80933e5
commit 94c5c83320
1 changed files with 32 additions and 45 deletions

View File

@ -16,12 +16,12 @@
limitations under the License. limitations under the License.
--> -->
<!-- The Solr schema file. This file should be named "schema.xml" and <!-- This is the Solr schema file. This file should be named "schema.xml" and
should be in the conf directory under the solr home should be in the conf directory under the solr home
(i.e. ./solr/conf/schema.xml by default) (i.e. ./solr/conf/schema.xml by default)
or located where the classloader for the Solr webapp can find it. or located where the classloader for the Solr webapp can find it.
For more information, on how to customize this file, please see... For more information, on how to customize this file, please see
http://wiki.apache.org/solr/SchemaXml http://wiki.apache.org/solr/SchemaXml
--> -->
@ -37,7 +37,10 @@
<!-- field type definitions. The "name" attribute is <!-- field type definitions. The "name" attribute is
just a label to be used by field definitions. The "class" just a label to be used by field definitions. The "class"
attribute and any other attributes determine the real attribute and any other attributes determine the real
behavior of the fieldtype. --> behavior of the fieldtype.
Class names starting with "solr" refer to java classes in the
org.apache.solr.analysis package.
-->
<!-- The StrField type is not analyzed, but indexed/stored verbatim. <!-- The StrField type is not analyzed, but indexed/stored verbatim.
- StrField and TextField support an optional compressThreshold which - StrField and TextField support an optional compressThreshold which
@ -112,32 +115,18 @@
this type on the same document, with the purpose of preventing false phrase this type on the same document, with the purpose of preventing false phrase
matching across fields. matching across fields.
For more info on customizing your analyzer chain, please see... For more info on customizing your analyzer chain, please see
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
--> -->
<!-- Standard analyzer commonly used by Lucene developers <!-- One can also specify an existing Analyzer class that has a
-->
<!-- Standard analyzer commonly used by Lucene developers -->
<fieldtype name="text_lu" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldtype>
<!-- One could also specify an existing Analyzer class that has a
default constructor via the class attribute on the analyzer element default constructor via the class attribute on the analyzer element
<fieldtype name="text_lu" class="solr.TextField"> <fieldtype name="text_greek" class="solr.TextField">
<analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/> <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
</fieldType> </fieldType>
--> -->
<!-- A text field that only splits on whitespace for more exact matching --> <!-- A text field that only splits on whitespace for exact matching of words -->
<fieldtype name="text_ws" class="solr.TextField" positionIncrementGap="100"> <fieldtype name="text_ws" class="solr.TextField" positionIncrementGap="100">
<analyzer> <analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
@ -157,7 +146,7 @@
<!-- in this example, we will only use synonyms at query time <!-- 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.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
--> -->
<filter class="solr.StopFilterFactory" ignoreCase="true"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/> <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
@ -166,7 +155,7 @@
<analyzer type="query"> <analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/> <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
@ -181,7 +170,7 @@
<analyzer> <analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/> <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="false"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/> <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
@ -252,9 +241,7 @@
<!-- field for the QueryParser to use when an explicit fieldname is absent --> <!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>text</defaultSearchField> <defaultSearchField>text</defaultSearchField>
<!-- SolrQueryParser configuration: <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
defaultOperator="AND|OR"
-->
<solrQueryParser defaultOperator="OR"/> <solrQueryParser defaultOperator="OR"/>
<!-- copyField commands copy one field to another at the time a document <!-- copyField commands copy one field to another at the time a document