codeformunich/Muenchen-Transparent

View on GitHub
docs/solr-core/conf/schema.xml

Summary

Maintainability
Test Coverage
<?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="RIS Suche" version="1.1">
   <fieldtype name="string"  class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
   <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
   <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
   <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
   <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <!--<charFilter class="solr.MappingCharFilterFactory" mapping="../conf/mapping-ISOLatin1Accent-ris.txt"/>-->
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="../conf/german_stop.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.LengthFilterFactory" min="2" max="50" />
        <filter class="solr.SnowballPorterFilterFactory" language="German2" protected="../conf/protwords.txt"/>
      </analyzer>
   </fieldType>
   <fieldType name="text_unchanged" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <!--<charFilter class="solr.MappingCharFilterFactory" mapping="../conf/mapping-ISOLatin1Accent-ris.txt"/>-->
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.WordDelimiterFilterFactory" splitOnNumerics="0" splitOnCaseChange="0" stemEnglishPossessive="0" preserveOriginal="1" catenateAll="1" />
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
   </fieldType>
   <fieldType name="text_ocr" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <!--<charFilter class="solr.MappingCharFilterFactory" mapping="../conf/mapping-ISOLatin1Accent-ris-ocr.txt"/>-->
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="../conf/german_stop.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.LengthFilterFactory" min="2" max="50" />
        <filter class="solr.SnowballPorterFilterFactory" language="German2" protected="../conf/protwords.txt"/>
      </analyzer>
   </fieldType>
   <fieldType name="text_ocr_unchanged" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <!--<charFilter class="solr.MappingCharFilterFactory" mapping="../conf/mapping-ISOLatin1Accent-ris-ocr.txt"/>-->
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.WordDelimiterFilterFactory" splitOnNumerics="0" splitOnCaseChange="0" stemEnglishPossessive="0" preserveOriginal="1" catenateAll="1" />
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
   </fieldType>
   <fieldType name="location_rpt"   class="solr.SpatialRecursivePrefixTreeFieldType"
               distErrPct="0.025"
               maxDistErr="0.000009"
               units="degrees"
            />

  <!-- general -->
  <field name="id"                  type="string"       indexed="true"  stored="true"  multiValued="false" required="true"/>
  <field name="aenderungs_datum"    type="date"         indexed="true"  stored="true"  multiValued="true" />
  <field name="sort_datum"          type="date"         indexed="true"  stored="true"  multiValued="false" />
  <field name="dokument_name"       type="string"       indexed="true"  stored="true"  multiValued="false"/>
  <field name="dokument_url"        type="string"       indexed="true"  stored="true"  multiValued="false"/>
  <field name="dokument_bas"        type="int"          indexed="true"  stored="true"  multiValued="true"/>
  <field name="referat_id"          type="int"          indexed="true"  stored="true"  multiValued="false"/>
  <field name="antrag_nr"           type="string"       indexed="true"  stored="true"  multiValued="false"/>
  <field name="antrag_wahlperiode"  type="string"       indexed="true"  stored="true"  multiValued="false"/>
  <field name="antrag_typ"          type="string"       indexed="true"  stored="true"  multiValued="false"/>
  <field name="antrag_ba"           type="int"          indexed="true"  stored="true"  multiValued="false"/>
  <field name="antrag_id"           type="int"          indexed="true"  stored="true"  multiValued="false"/>
  <field name="antrag_betreff"      type="text"         indexed="true"  stored="true"  multiValued="false" />
  <field name="antrag_betreff_unchanged"    type="text_unchanged"        indexed="true"  stored="true"  multiValued="false" />
  <field name="antrag_erstellt"     type="date"         indexed="true"  stored="true"  multiValued="false" />
  <field name="antrag_gestellt_von" type="text_unchanged"        indexed="true"  stored="true"  multiValued="false" /> 
  <field name="termin_reihe"        type="int"          indexed="true"  stored="true"  multiValued="false"/>
  <field name="termin_gremium"      type="int"          indexed="true"  stored="true"  multiValued="false"/>
  <field name="termin_datum"        type="date"         indexed="true"  stored="true"  multiValued="false" />
  <field name="text"                type="text"         indexed="true"  stored="true"  multiValued="false" />
  <field name="text_unchanged"      type="text_unchanged"        indexed="true"  stored="true"  multiValued="false" /> 
  <field name="text_ocr"            type="text_ocr"     indexed="true"  stored="true"  multiValued="false" />
  <field name="text_ocr_unchanged"  type="text_ocr_unchanged" indexed="true"  stored="true"  multiValued="false" /> 
  <field name="geo"                 type="location_rpt" indexed="true"  stored="true"  multiValued="true" />

 <!-- field to use to determine and enforce document uniqueness. -->
 <uniqueKey>id</uniqueKey>

 <!-- field for the QueryParser to use when an explicit fieldname is absent -->
 <defaultSearchField>text</defaultSearchField>

 <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
 <solrQueryParser defaultOperator="AND"/>
 
 <copyField source="text" dest="text_unchanged"/>
 <copyField source="text_ocr" dest="text_ocr_unchanged"/>
 <copyField source="antrag_betreff" dest="antrag_betreff_unchanged"/>
</schema>