forked from tjackiw/acts_as_solr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.xml
126 lines (109 loc) · 6.54 KB
/
schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is the Solr schema file. This file should be named "schema.xml" and
should be in the conf directory under the solr home
(i.e. ./solr/conf/schema.xml by default)
or located where the classloader for the Solr webapp can find it.
This example schema is the recommended starting point for users.
It should be kept correct and concise, usable out-of-the-box.
For more information, on how to customize this file, please see
http://wiki.apache.org/solr/SchemaXml
-->
<schema name="acts_as_solr" version="0.9">
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="integer" class="solr.IntField" omitNorms="false"/>
<fieldType name="long" class="solr.LongField" omitNorms="false"/>
<fieldType name="float" class="solr.FloatField" omitNorms="false"/>
<fieldType name="double" class="solr.DoubleField" omitNorms="false"/>
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="false"/>
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<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.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="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.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
<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.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="false">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.TrimFilterFactory" />
<filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" replace="all"/>
</analyzer>
</fieldType>
<fieldtype name="text_zh" class="solr.TextField">
<analyzer class="org.apache.lucene.analysis.cn.ChineseAnalyzer"/>
</fieldtype>
</types>
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true" />
<field name="pk_i" type="integer" indexed="true" stored="true"/>
<field name="pk_s" type="string" indexed="true" stored="true"/>
<field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
<dynamicField name="*_i" type="integer" indexed="true" stored="false"/>
<dynamicField name="*_t" type="text" indexed="true" stored="false"/>
<dynamicField name="*_f" type="float" indexed="true" stored="false"/>
<dynamicField name="*_b" type="boolean" indexed="true" stored="false"/>
<dynamicField name="*_d" type="date" indexed="true" stored="false"/>
<dynamicField name="*_s" type="string" indexed="true" stored="false"/>
<dynamicField name="*_ri" type="sint" indexed="true" stored="false"/>
<dynamicField name="*_rf" type="sfloat" indexed="true" stored="false"/>
<dynamicField name="*_facet" type="string" indexed="true" stored="false"/>
<dynamicField name="*_s_mv" type="string" indexed="true" stored="false" multiValued="true"/>
<dynamicField name="*_zh_text" type="text_zh" indexed="true" stored="false" multiValued="true"/>
<dynamicField name="*_display" type="text" indexed="false" stored="true" multiValued="true"/>
</fields>
<uniqueKey>id</uniqueKey>
<defaultSearchField>text</defaultSearchField>
<copyField source="*_t" dest="text"/>
<copyField source="*_facet" dest="text"/>
<solrQueryParser defaultOperator="AND"/>
</schema>