All Downloads are FREE. Search and download functionalities are using the official Maven repository.

default-topic-trainingset.conf.schema.xml Maven / Gradle / Ivy

Go to download

Implementation of an annotation engine that links the content item to a set of possible categories from a dedicated Solr index using MoreLikeThis queries. The classification can be either applied to a complete document (text in a given language) which is the default behavior or to a specific portion of the text (using a TextAnnotation).

The newest version!
<?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.3">
  <types>
    <fieldType name="string" class="solr.StrField" sortMissingLast="true"
      omitNorms="true"/>

    <fieldType name="int" class="solr.TrieIntField" precisionStep="0"
      omitNorms="true" positionIncrementGap="0"/>

    <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"
      precisionStep="6" positionIncrementGap="0"/>

    <fieldType name="random" class="solr.RandomSortField" indexed="true" />

    <fieldType name="text" class="solr.TextField">
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
<!--         <filter class="solr.StopFilterFactory" ignoreCase="true" -->
<!--           words="stopwords_en.txt" enablePositionIncrements="false" /> -->
        <filter class="solr.LowerCaseFilterFactory"/>
        <!-- The use of Shingle might help improve the quality but they increase
        the size of the index far too much. It would be better to use a
        collocation bloom filter to mitigate this effect:
        http://issues.apache.org/jira/browse/MAHOUT-415

        <filter class="solr.ShingleFilterFactory" maxShingleSize="2"
          outputUnigrams="true"/>
         -->
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
<!--         <filter class="solr.StopFilterFactory" ignoreCase="true" -->
<!--           words="stopwords_en.txt" enablePositionIncrements="false" /> -->
<!--         <filter class="solr.SynonymFilterFactory" -->
<!--           synonyms="synonyms.txt" ignoreCase="true" expand="true"/> -->
        <filter class="solr.LowerCaseFilterFactory"/>
        <!--
        <filter class="solr.ShingleFilterFactory" maxShingleSize="2"
          outputUnigrams="true"/>
         -->
      </analyzer>
    </fieldType>

 </types>

 <fields>
   <field name="id" type="string" indexed="true" stored="true" required="true" />
   <field name="topics" type="string" indexed="true" stored="true" multiValued="true" /> 
   <field name="text" type="text" indexed="true" stored="true"
     termVectors="true" termPositions="false" termOffsets="false" />
   <field name="modification_dt" type="tdate" indexed="true" stored="true" />
   <field name="random" type="random" indexed="true" stored="false" />
 </fields>

 <uniqueKey>id</uniqueKey>
 <defaultSearchField>text</defaultSearchField>
 <solrQueryParser defaultOperator="AND"/>
</schema>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy