<?xml version="1.0" encoding="UTF-8" ?>

<schema name="YaCy2Solr" version="1.4">
    <types>
        <fieldType name="string"   class="solr.StrField"        omitNorms="true"  sortMissingLast="true" docValues="true" />
        <fieldType name="boolean"  class="solr.BoolField"       omitNorms="true"  sortMissingLast="true" />
        <fieldType name="int"      class="solr.TrieIntField"    omitNorms="true"  precisionStep="0" positionIncrementGap="0" docValues="true" />
        <fieldType name="tint"     class="solr.TrieIntField"    precisionStep="8" positionIncrementGap="0" docValues="true" />
        <fieldType name="long"     class="solr.TrieLongField"   precisionStep="0" positionIncrementGap="0" docValues="true" />
        <fieldType name="tlong"    class="solr.TrieLongField"   precisionStep="8" positionIncrementGap="0" docValues="true" />
        <fieldType name="double"   class="solr.TrieDoubleField" omitNorms="true"  precisionStep="0" positionIncrementGap="0" docValues="true" />
        <fieldType name="tdouble"  class="solr.TrieDoubleField" omitNorms="true"  precisionStep="8" positionIncrementGap="0" docValues="true" />
        <fieldType name="date"     class="solr.TrieDateField"   omitNorms="true"  precisionStep="0" positionIncrementGap="0" docValues="true" />
        <fieldType name="float"    class="solr.TrieFloatField"  precisionStep="0" positionIncrementGap="0" docValues="true" />
        <fieldType name="tfloat"   class="solr.TrieFloatField"  precisionStep="8" positionIncrementGap="0" docValues="true" />
        <fieldType name="location" class="solr.LatLonType"      subFieldSuffix="_coordinate"/>
    
        <fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
            <analyzer type="index">
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
            </analyzer>
            <analyzer type="query">
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
                <filter class="solr.LowerCaseFilterFactory"/>
            </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.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
                <filter class="solr.LowerCaseFilterFactory"/>
            </analyzer>
        </fieldType>

        <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
            <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.KeywordMarkerFilterFactory" protected="protwords.txt"/>
                <filter class="solr.EnglishMinimalStemFilterFactory"/>
                <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
            </analyzer>
        </fieldType>
    </types>
    
    <fields>
       <field name="_version_" type="long" indexed="true" stored="true" docValues="true" /> <!-- a mandatory solr field used for operation in SolrCloud -->
       <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/> <!-- this is default in solrconfix.xml; not used but you get errors when not defining it -->
       
#{fields}#
        <!-- #[comment]# -->
        <field name="#[solrname]#" type="#[type]#"#(indexedChecked)#:: indexed="true"#(/indexedChecked)##(storedChecked)#:: stored="true"#(/storedChecked)##(multiValuedChecked)#:: multiValued="true"#(/multiValuedChecked)##(omitNormsChecked)#:: omitNorms="true"#(/omitNormsChecked)##(docValueChecked)#:: docValues="true"#(/docValueChecked)#/>

#{/fields}#

        #(copyFieldAuthor)#::<field name="author_sxt" type="string" indexed="true" stored="true" multiValued="true"/>
        <copyField source="author" dest="author_sxt" maxChars="100" />#(/copyFieldAuthor)#
    </fields>
    
    <uniqueKey>#[solruniquekey]#</uniqueKey>
    <!-- defaultSearchField element is deprecated in Solr versions 3.6 and higher. Instead, df request parameter should be used-->
    <defaultSearchField>#[solrdefaultsearchfield]#</defaultSearchField>
    <!-- default operator parameter has been deprecated in Solr versions 3.6 and higher. Instead, the query parser q.op parameter should be used in request handler. -->
    <solrQueryParser defaultOperator="AND"/>
    
    <!-- if you are using a search client using the default search field "text", then use this line to get to all indexed documents -->
    <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->    
</schema>

