| <?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. |
| --> |
| |
| <schema name="test-custom-field-sort" version="1.6"> |
| <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> |
| <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> |
| <fieldType name="string" class="solr.StrField" sortMissingLast="true"/> |
| <fieldType name="text" class="solr.TextField"> |
| <analyzer> |
| <tokenizer class="solr.StandardTokenizerFactory"/> |
| </analyzer> |
| </fieldType> |
| <fieldType class="org.apache.solr.schema.SortableBinaryField" name="sortable_binary"/> |
| <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/> |
| <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/> |
| <field name="signatureField" type="string" indexed="true" stored="false"/> |
| <field name="text" type="text" indexed="true" stored="false"/> |
| <field name="payload" type="sortable_binary" indexed="false" |
| stored="true" multiValued="false" docValues="true" required="true"/> |
| <dynamicField name="*_sS" type="string" indexed="false" stored="true"/> |
| |
| <!-- int varient of id, adding this here simplifies some indexing to do numeric sorting --> |
| <field name="id_i" type="int" indexed="true" stored="true" multiValued="false" /> |
| <copyField source="id" dest="id_i" /> |
| |
| <!-- catchall wildcard to help ensure we aren't breaking function sorting --> |
| <dynamicField name="*" type="string" indexed="true" stored="true"/> |
| <uniqueKey>id</uniqueKey> |
| </schema> |