|
45 | 45 | that avoids logging every request
|
46 | 46 | -->
|
47 | 47 |
|
48 |
| -<schema name="example" version="1.5"> |
49 |
| - <!-- attribute "name" is the name of this schema and is only used for display purposes. |
50 |
| - version="x.y" is Solr's version number for the schema syntax and semantics. It should |
51 |
| - not normally be changed by applications. |
52 |
| - 1.0: multiValued attribute did not exist, all fields are multiValued by nature |
53 |
| - 1.1: multiValued attribute introduced, false by default |
54 |
| - 1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields. |
55 |
| - 1.3: removed optional field compress feature |
56 |
| - 1.4: default auto-phrase (QueryParser feature) to off |
57 |
| - 1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...) |
58 |
| - --> |
59 |
| - |
| 48 | +<schema name="default" version="1.5"> |
60 | 49 | <fields>
|
61 |
| - <!-- Valid attributes for fields: |
62 |
| - name: mandatory - the name for the field |
63 |
| - type: mandatory - the name of a field type from the |
64 |
| - <types> fieldType section |
65 |
| - indexed: true if this field should be indexed (searchable or sortable) |
66 |
| - stored: true if this field should be retrievable |
67 |
| - multiValued: true if this field may contain multiple values per document |
68 |
| - omitNorms: (expert) set to true to omit the norms associated with |
69 |
| - this field (this disables length normalization and index-time |
70 |
| - boosting for the field, and saves some memory). Only full-text |
71 |
| - fields or fields that need an index-time boost need norms. |
72 |
| - Norms are omitted for primitive (non-analyzed) types by default. |
73 |
| - termVectors: [false] set to true to store the term vector for a |
74 |
| - given field. |
75 |
| - When using MoreLikeThis, fields used for similarity should be |
76 |
| - stored for best performance. |
77 |
| - termPositions: Store position information with the term vector. |
78 |
| - This will increase storage costs. |
79 |
| - termOffsets: Store offset information with the term vector. This |
80 |
| - will increase storage costs. |
81 |
| - required: The field is required. It will throw an error if the |
82 |
| - value does not exist |
83 |
| - default: a value that should be used if no value is specified |
84 |
| - when adding a document. |
85 |
| - --> |
86 |
| - |
87 |
| - <!-- field names should consist of alphanumeric or underscore characters only and |
88 |
| - not start with a digit. This is not currently strictly enforced, |
89 |
| - but other field names will not have first class support from all components |
90 |
| - and back compatibility is not guaranteed. Names with both leading and |
91 |
| - trailing underscores (e.g. _version_) are reserved. |
92 |
| - --> |
93 |
| - |
94 | 50 | <field name="id" type="string" indexed="true" stored="true" required="true" />
|
95 |
| - <field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/> |
96 |
| - <field name="name" type="text_general" indexed="true" stored="true"/> |
97 |
| - <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/> |
98 |
| - <field name="cat" type="string" indexed="true" stored="true" multiValued="true"/> |
99 |
| - <field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/> |
100 |
| - <field name="includes" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" /> |
101 |
| - |
102 |
| - <field name="weight" type="float" indexed="true" stored="true"/> |
103 |
| - <field name="price" type="float" indexed="true" stored="true"/> |
104 |
| - <field name="popularity" type="int" indexed="true" stored="true" /> |
105 |
| - <field name="inStock" type="boolean" indexed="true" stored="true" /> |
106 |
| - |
107 |
| - <field name="store" type="location" indexed="true" stored="true"/> |
108 | 51 |
|
109 | 52 | <!-- Common metadata fields, named specifically to match up with
|
110 | 53 | SolrCell metadata when parsing rich documents such as Word, PDF.
|
|
131 | 74 | leading wildcard queries. -->
|
132 | 75 | <field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/>
|
133 | 76 |
|
134 |
| - <!-- non-tokenized version of manufacturer to make it easier to sort or group |
135 |
| - results by manufacturer. copied from "manu" via copyField --> |
136 |
| - <field name="manu_exact" type="string" indexed="true" stored="false"/> |
137 |
| - |
138 |
| - <field name="payloads" type="payloads" indexed="true" stored="true"/> |
139 |
| - |
140 |
| - |
141 | 77 | <field name="_version_" type="long" indexed="true" stored="true"/>
|
142 | 78 |
|
143 |
| - <!-- Uncommenting the following will create a "timestamp" field using |
144 |
| - a default value of "NOW" to indicate when each document was indexed. |
145 |
| - --> |
146 |
| - <!-- |
147 |
| - <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/> |
148 |
| - --> |
149 |
| - |
150 | 79 | <!-- Entropy Data: Data related to anti-entropy -->
|
151 | 80 | <field name="_yz_ed" type="string" indexed="true" stored="true"/>
|
152 | 81 |
|
|
166 | 95 | <!-- Riak Key: The key of the Riak object this doc corresponds to. -->
|
167 | 96 | <field name="_yz_rk" type="string" indexed="true" stored="true"/>
|
168 | 97 |
|
169 |
| - |
170 |
| - <!-- Dynamic field definitions allow using convention over configuration |
171 |
| - for fields via the specification of patterns to match field names. |
172 |
| - EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i) |
173 |
| - RESTRICTION: the glob-like pattern in the name attribute must have |
174 |
| - a "*" only at the start or the end. --> |
175 |
| - |
176 | 98 | <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
|
177 | 99 | <dynamicField name="*_is" type="int" indexed="true" stored="true" multiValued="true"/>
|
178 | 100 | <dynamicField name="*_s" type="string" indexed="true" stored="true" />
|
|
209 | 131 | <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
|
210 | 132 |
|
211 | 133 | <dynamicField name="random_*" type="random" />
|
212 |
| - |
213 |
| - <!-- uncomment the following to ignore any fields that don't already match an existing |
214 |
| - field name or dynamic field, rather than reporting them as an error. |
215 |
| - alternately, change the type="ignored" to some other type e.g. "text" if you want |
216 |
| - unknown fields indexed and/or stored by default --> |
217 |
| - <!--dynamicField name="*" type="ignored" multiValued="true" /--> |
218 |
| - |
219 | 134 | </fields>
|
220 | 135 |
|
221 | 136 |
|
|
224 | 139 | -->
|
225 | 140 | <uniqueKey>id</uniqueKey>
|
226 | 141 |
|
227 |
| - <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when |
228 |
| - parsing a query string that isn't explicit about the field. Machine (non-user) |
229 |
| - generated queries are best made explicit, or they can use the "df" request parameter |
230 |
| - which takes precedence over this. |
231 |
| - Note: Un-commenting defaultSearchField will be insufficient if your request handler |
232 |
| - in solrconfig.xml defines "df", which takes precedence. That would need to be removed. |
233 |
| - <defaultSearchField>text</defaultSearchField> --> |
234 |
| - |
235 |
| - <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers |
236 |
| - when parsing a query string to determine if a clause of the query should be marked as |
237 |
| - required or optional, assuming the clause isn't already marked by some operator. |
238 |
| - The default is OR, which is generally assumed so it is not a good idea to change it |
239 |
| - globally here. The "q.op" request parameter takes precedence over this. |
240 |
| - <solrQueryParser defaultOperator="OR"/> --> |
241 |
| - |
242 |
| - <!-- copyField commands copy one field to another at the time a document |
243 |
| - is added to the index. It's used either to index the same field differently, |
244 |
| - or to add multiple fields to the same field for easier/faster searching. --> |
245 |
| - |
246 |
| - <copyField source="cat" dest="text"/> |
247 |
| - <copyField source="name" dest="text"/> |
248 |
| - <copyField source="manu" dest="text"/> |
249 |
| - <copyField source="features" dest="text"/> |
250 |
| - <copyField source="includes" dest="text"/> |
251 |
| - <copyField source="manu" dest="manu_exact"/> |
252 |
| - |
253 |
| - <!-- Above, multiple source fields are copied to the [text] field. |
254 |
| - Another way to map multiple source fields to the same |
255 |
| - destination field is to use the dynamic field syntax. |
256 |
| - copyField also supports a maxChars to copy setting. --> |
257 |
| - |
258 |
| - <!-- <copyField source="*_t" dest="text" maxChars="3000"/> --> |
259 |
| - |
260 |
| - <!-- copy name to alphaNameSort, a field designed for sorting by name --> |
261 |
| - <!-- <copyField source="name" dest="alphaNameSort"/> --> |
262 |
| - |
263 | 142 |
|
264 | 143 | <!-- Similarity is the scoring routine for each document vs. a query.
|
265 | 144 | A custom similarity may be specified here, but the default is fine
|
|
0 commit comments