| <?xml version="1.0" ?> |
| <!-- |
| 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. |
| --> |
| |
| <!-- Test schema file for CollationField options --> |
| |
| <schema name="test" version="1.0"> |
| |
| <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/> |
| |
| <!-- basic text field --> |
| <fieldType name="text" class="solr.TextField"> |
| <analyzer> |
| <tokenizer class="solr.StandardTokenizerFactory"/> |
| <filter class="solr.LowerCaseFilterFactory"/> |
| </analyzer> |
| </fieldType> |
| |
| <!-- ignores punctuation and whitespace --> |
| <fieldType name="sort_ignore_punctuation_t" class="solr.ICUCollationField" |
| locale="en" strength="primary" alternate="shifted"/> |
| <!-- ignores only whitespace --> |
| <fieldType name="sort_ignore_space_t" class="solr.ICUCollationField" |
| locale="en" strength="primary" alternate="shifted" variableTop=" "/> |
| <!-- ignores only accents, but not case --> |
| <fieldType name="sort_ignore_accents_t" class="solr.ICUCollationField" |
| locale="en" strength="primary" caseLevel="true"/> |
| <!-- sorts numerics in numeric order --> |
| <fieldType name="sort_numerics_t" class="solr.ICUCollationField" |
| locale="en" numeric="true"/> |
| <!-- sorts uppercase before lowercase --> |
| <fieldType name="sort_uppercase_first_t" class="solr.ICUCollationField" |
| locale="en" strength="tertiary" caseFirst="upper"/> |
| |
| |
| <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/> |
| <field name="text" type="text" indexed="true" stored="false"/> |
| <field name="sort_ignore_punctuation" type="sort_ignore_punctuation_t" indexed="true" stored="false" |
| multiValued="false"/> |
| <field name="sort_ignore_space" type="sort_ignore_space_t" indexed="true" stored="false" multiValued="false"/> |
| <field name="sort_ignore_accents" type="sort_ignore_accents_t" indexed="true" stored="false" multiValued="false"/> |
| <field name="sort_numerics" type="sort_numerics_t" indexed="true" stored="false" multiValued="false"/> |
| <field name="sort_uppercase_first" type="sort_uppercase_first_t" indexed="true" stored="false" multiValued="false"/> |
| |
| |
| <uniqueKey>id</uniqueKey> |
| |
| <!-- copy our text to some sort fields with different orders --> |
| <copyField source="text" dest="sort_ignore_punctuation"/> |
| <copyField source="text" dest="sort_ignore_space"/> |
| <copyField source="text" dest="sort_ignore_accents"/> |
| <copyField source="text" dest="sort_numerics"/> |
| <copyField source="text" dest="sort_uppercase_first"/> |
| </schema> |