| <?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. |
| --> |
| |
| <schema name="example" version="1.5"> |
| <fields> |
| <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> |
| <field name="finalScore" type="string" indexed="true" stored="true" multiValued="false"/> |
| <field name="finalScoreFloat" type="float" indexed="true" stored="true" multiValued="false"/> |
| <field name="field" type="text_general" indexed="true" stored="false" multiValued="false"/> |
| <field name="title" type="text_general" indexed="true" stored="true"/> |
| <field name="description" type="text_general" indexed="true" stored="true"/> |
| <field name="keywords" type="text_general" indexed="true" stored="true" multiValued="true"/> |
| <field name="popularity" type="int" indexed="true" stored="true" /> |
| <field name="dvIntPopularity" type="int" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvLongPopularity" type="long" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvFloatPopularity" type="float" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvDoublePopularity" type="double" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvStringPopularity" type="string" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvStringPopularities" type="string" indexed="false" docValues="true" stored="false" multiValued="true"/> |
| <field name="normHits" type="float" indexed="true" stored="true" /> |
| |
| <field name="isTrendy" type="boolean" indexed="true" stored="true" /> |
| <field name="dvIsTrendy" type="boolean" indexed="true" stored="false" docValues="true"/> |
| |
| <field name="dvIntField" type="int" indexed="false" docValues="true" stored="false" default="-1" multiValued="false"/> |
| <field name="dvLongField" type="long" indexed="false" docValues="true" stored="false" default="-2" multiValued="false"/> |
| <field name="dvFloatField" type="float" indexed="false" docValues="true" stored="false" default="-3" multiValued="false"/> |
| <field name="dvDoubleField" type="double" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvStrNumField" type="string" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvStrBoolField" type="boolean" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| <field name="dvDateField" type="date" indexed="false" docValues="true" stored="false" multiValued="false"/> |
| |
| <field name="noDvFloatField" type="float" indexed="false" docValues="false" stored="true" multiValued="false"/> |
| <field name="noDvStrNumField" type="string" indexed="false" docValues="false" stored="true" multiValued="false"/> |
| <field name="noDvDateField" type="date" indexed="false" docValues="false" stored="true" multiValued="false"/> |
| |
| <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/> |
| <field name="_version_" type="long" indexed="true" stored="true"/> |
| |
| <dynamicField name="*_s" type="string" indexed="true" stored="true" /> |
| <dynamicField name="*_t" type="text_general" indexed="true" stored="true"/> |
| </fields> |
| |
| <uniqueKey>id</uniqueKey> |
| |
| <copyField source="title" dest="text"/> |
| <copyField source="description" dest="text"/> |
| |
| <copyField source="popularity" dest="dvIntPopularity"/> |
| <copyField source="popularity" dest="dvLongPopularity"/> |
| <copyField source="popularity" dest="dvFloatPopularity"/> |
| <copyField source="popularity" dest="dvDoublePopularity"/> |
| |
| <copyField source="isTrendy" dest="dvIsTrendy"/> |
| |
| <types> |
| <fieldType name="string" class="solr.StrField" sortMissingLast="true" /> |
| <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/> |
| <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/> |
| <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/> |
| <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/> |
| <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/> |
| <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" positionIncrementGap="0"/> |
| <fieldtype name="binary" class="solr.BinaryField"/> |
| |
| <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100"> |
| <analyzer> |
| <tokenizer class="solr.WhitespaceTokenizerFactory"/> |
| </analyzer> |
| </fieldType> |
| |
| <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> |
| <analyzer type="index"> |
| <tokenizer class="solr.StandardTokenizerFactory"/> |
| <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> |
| <filter class="solr.LowerCaseFilterFactory"/> |
| </analyzer> |
| <analyzer type="query"> |
| <tokenizer class="solr.StandardTokenizerFactory"/> |
| <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> |
| <filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> |
| <filter class="solr.LowerCaseFilterFactory"/> |
| </analyzer> |
| </fieldType> |
| |
| <fieldType name="text_lc" class="solr.TextField" positionIncrementGap="100"> |
| <analyzer> |
| <tokenizer class="solr.KeywordTokenizerFactory"/> |
| <filter class="solr.LowerCaseFilterFactory" /> |
| </analyzer> |
| </fieldType> |
| </types> |
| |
| <!-- Similarity is the scoring routine for each document vs. a query. |
| A custom Similarity or SimilarityFactory may be specified here, but |
| the default is fine for most applications. |
| For more info: http://wiki.apache.org/solr/SchemaXml#Similarity |
| --> |
| <!-- |
| <similarity class="com.example.solr.CustomSimilarityFactory"> |
| <str name="paramkey">param value</str> |
| </similarity> |
| --> |
| |
| </schema> |