Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2012
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.55 KB | None | 0 0
  1. <?xml version="1.0" ?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements.  See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License.  You may obtain a copy of the License at
  9.  
  10.     http://www.apache.org/licenses/LICENSE-2.0
  11.  
  12. Unless required by applicable law or agreed to in writing, software
  13. distributed under the License is distributed on an "AS IS" BASIS,
  14. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. See the License for the specific language governing permissions and
  16. limitations under the License.
  17. -->
  18.  
  19. <schema name="example core zero" version="1.1">
  20.   <types>
  21.    <fieldtype name="string"  class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
  22.    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
  23.    <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
  24.    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
  25.  
  26. <!-- A general text field that has reasonable, generic
  27.          cross-language defaults: it tokenizes with StandardTokenizer,
  28.          removes stop words from case-insensitive "stopwords.txt"
  29.          (empty by default), and down cases.  At query time only, it
  30.          also applies synonyms. -->
  31.         <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
  32.           <analyzer type="index">
  33.         <tokenizer class="solr.StandardTokenizerFactory"/>
  34.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  35.         <!-- in this example, we will only use synonyms at query time
  36.         <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  37.         -->
  38.         <filter class="solr.LowerCaseFilterFactory"/>
  39.           </analyzer>
  40.           <analyzer type="query">
  41.         <tokenizer class="solr.StandardTokenizerFactory"/>
  42.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  43.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  44.         <filter class="solr.LowerCaseFilterFactory"/>
  45.           </analyzer>
  46.         </fieldType>
  47.   </types>
  48.  
  49.  
  50. <fields>
  51.         <field name="ressorts" type="string" indexed="true" stored="true" multiValued="true"/>
  52.         <field name="timestamp" type="date" indexed="true" stored="true" multiValued="false"/>
  53.         <field name="title" type="text_general" indexed="true" stored="true" multiValued="false"/>
  54.         <field name="description" type="text_general" indexed="true" stored="true" multiValued="false"/>
  55.         <field name="guid" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
  56.         <field name="link" type="string" indexed="true" stored="true" multiValued="false"/>
  57.         <field name="source" type="string" indexed="true" stored="true" multiValued="false"/>
  58.         <field name="ressortWeights" type="tdouble" indexed="true" stored="true" multiValued="true"/>
  59. </fields>
  60.  
  61.  
  62.  <!-- field to use to determine and enforce document uniqueness. -->
  63.  <uniqueKey>guid</uniqueKey>
  64.  
  65.  <!-- field for the QueryParser to use when an explicit fieldname is absent -->
  66.  <defaultSearchField>description</defaultSearchField>
  67.  
  68.  <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
  69.  <solrQueryParser defaultOperator="OR"/>
  70. </schema>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement