236b417b424715c89e99dca0b0820a95b42fb1af
[prawokultury.git] / doc / schema.xml
1 <?xml version="1.0" ?>
2 <!--
3  Licensed to the Apache Software Foundation (ASF) under one or more
4  contributor license agreements.  See the NOTICE file distributed with
5  this work for additional information regarding copyright ownership.
6  The ASF licenses this file to You under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with
8  the License.  You may obtain a copy of the License at
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 -->
18
19 <schema name="default" version="1.4">
20   <types>
21     <fieldtype name="string"  class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
22     <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
23     <fieldtype name="binary" class="solr.BinaryField"/>
24
25     <!-- Numeric field types that manipulate the value into
26          a string value that isn't human-readable in its internal form,
27          but with a lexicographic ordering the same as the numeric ordering,
28          so that range queries work correctly. -->
29     <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
30     <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
31     <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
32     <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
33
34     <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
35     <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
36     <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
37     <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
38
39     <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
40     <!-- A Trie based date field for faster date range queries and date faceting. -->
41     <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
42
43     <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
44     <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
45     <fieldtype name="geohash" class="solr.GeoHashField"/>
46
47     <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
48       <analyzer type="index">
49         <tokenizer class="solr.StandardTokenizerFactory"/>
50         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
51         <!-- in this example, we will only use synonyms at query time
52         <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
53         -->
54         <filter class="solr.LowerCaseFilterFactory"/>
55       </analyzer>
56       <analyzer type="query">
57         <tokenizer class="solr.StandardTokenizerFactory"/>
58         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
59         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
60         <filter class="solr.LowerCaseFilterFactory"/>
61       </analyzer>
62     </fieldType>
63
64     <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
65       <analyzer type="index">
66         <tokenizer class="solr.StandardTokenizerFactory"/>
67         <filter class="solr.StopFilterFactory"
68                 ignoreCase="true"
69                 words="stopwords_en.txt"
70                 enablePositionIncrements="true"
71                 />
72         <filter class="solr.LowerCaseFilterFactory"/>
73         <filter class="solr.EnglishPossessiveFilterFactory"/>
74         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
75         <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
76           <filter class="solr.EnglishMinimalStemFilterFactory"/>
77         -->
78         <filter class="solr.PorterStemFilterFactory"/>
79       </analyzer>
80       <analyzer type="query">
81         <tokenizer class="solr.StandardTokenizerFactory"/>
82         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
83         <filter class="solr.StopFilterFactory"
84                 ignoreCase="true"
85                 words="stopwords_en.txt"
86                 enablePositionIncrements="true"
87                 />
88         <filter class="solr.LowerCaseFilterFactory"/>
89         <filter class="solr.EnglishPossessiveFilterFactory"/>
90         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
91         <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
92           <filter class="solr.EnglishMinimalStemFilterFactory"/>
93         -->
94         <filter class="solr.PorterStemFilterFactory"/>
95       </analyzer>
96     </fieldType>
97
98     <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
99       <analyzer>
100         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
101       </analyzer>
102     </fieldType>
103
104     <fieldType name="ngram" class="solr.TextField" >
105       <analyzer type="index">
106         <tokenizer class="solr.KeywordTokenizerFactory"/>
107         <filter class="solr.LowerCaseFilterFactory"/>
108         <filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" />
109       </analyzer>
110       <analyzer type="query">
111         <tokenizer class="solr.KeywordTokenizerFactory"/>
112         <filter class="solr.LowerCaseFilterFactory"/>
113       </analyzer>
114     </fieldType>
115
116     <fieldType name="edge_ngram" class="solr.TextField" positionIncrementGap="1">
117       <analyzer type="index">
118         <tokenizer class="solr.WhitespaceTokenizerFactory" />
119         <filter class="solr.LowerCaseFilterFactory" />
120         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
121         <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front" />
122       </analyzer>
123       <analyzer type="query">
124         <tokenizer class="solr.WhitespaceTokenizerFactory" />
125         <filter class="solr.LowerCaseFilterFactory" />
126         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
127       </analyzer>
128     </fieldType>
129   </types>
130
131   <fields>
132     <!-- general -->
133     <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
134     <field name="django_ct" type="string" indexed="true" stored="true" multiValued="false"/>
135     <field name="django_id" type="string" indexed="true" stored="true" multiValued="false"/>
136
137     <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>
138     <dynamicField name="*_s"  type="string"  indexed="true"  stored="true"/>
139     <dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/>
140     <dynamicField name="*_t"  type="text_en"    indexed="true"  stored="true"/>
141     <dynamicField name="*_b"  type="boolean" indexed="true"  stored="true"/>
142     <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>
143     <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>
144     <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
145     <dynamicField name="*_p" type="location" indexed="true" stored="true"/>
146     <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
147
148
149   </fields>
150
151   <!-- field to use to determine and enforce document uniqueness. -->
152   <uniqueKey>id</uniqueKey>
153
154   <!-- field for the QueryParser to use when an explicit fieldname is absent -->
155   <defaultSearchField></defaultSearchField>
156
157   <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
158   <solrQueryParser defaultOperator="AND"/>
159 </schema>
160