daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jun 27th, 2015 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <schema name="nutch" version="1.4">
  3.     <types>
  4.  
  5.             <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
  6.             <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
  7.  
  8.  
  9.             <!--
  10.               Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
  11.             -->
  12.             <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  13.             <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  14.             <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  15.             <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  16.             <fieldType name="tlongs" class="solr.TrieLongField" positionIncrementGap="0" multiValued="true" precisionStep="8"/>
  17.  
  18.             <!--
  19.              Numeric field types that index each value at various levels of precision
  20.              to accelerate range queries when the number of values between the range
  21.              endpoints is large. See the javadoc for NumericRangeQuery for internal
  22.              implementation details.
  23.  
  24.              Smaller precisionStep values (specified in bits) will lead to more tokens
  25.              indexed per value, slightly larger index size, and faster range queries.
  26.              A precisionStep of 0 disables indexing at different precision levels.
  27.             -->
  28.             <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  29.             <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  30.             <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  31.             <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  32.             <fieldType name="tdoubles" class="solr.TrieDoubleField" positionIncrementGap="0" multiValued="true" precisionStep="8"/>
  33.  
  34.             <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  35.                  is a more restricted form of the canonical representation of dateTime
  36.                  http://www.w3.org/TR/xmlschema-2/#dateTime    
  37.                  The trailing "Z" designates UTC time and is mandatory.
  38.                  Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  39.                  All other components are mandatory.
  40.  
  41.                  Expressions can also be used to denote calculations that should be
  42.                  performed relative to "NOW" to determine the value, ie...
  43.  
  44.                        NOW/HOUR
  45.                           ... Round to the start of the current hour
  46.                        NOW-1DAY
  47.                           ... Exactly 1 day prior to now
  48.                        NOW/DAY+6MONTHS+3DAYS
  49.                           ... 6 months and 3 days in the future from the start of
  50.                               the current day
  51.  
  52.                  Consult the DateField javadocs for more information.
  53.  
  54.                  Note: For faster range queries, consider the tdate type
  55.               -->
  56.             <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
  57.  
  58.             <!-- A Trie based date field for faster date range queries and date faceting. -->
  59.             <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
  60.  
  61.  
  62.             <!-- solr.TextField allows the specification of custom text analyzers
  63.                  specified as a tokenizer and a list of token filters. Different
  64.                  analyzers may be specified for indexing and querying.
  65.  
  66.                  The optional positionIncrementGap puts space between multiple fields of
  67.                  this type on the same document, with the purpose of preventing false phrase
  68.                  matching across fields.
  69.  
  70.                  For more info on customizing your analyzer chain, please see
  71.                  http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  72.              -->
  73.  
  74.             <!-- A general text field that has reasonable, generic
  75.                  cross-language defaults: it tokenizes with StandardTokenizer,
  76.                  removes stop words from case-insensitive "stopwords.txt"
  77.                  (empty by default), and down cases.  At query time only, it
  78.                  also applies synonyms. -->
  79.             <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
  80.                     <analyzer type="index">
  81.                             <tokenizer class="solr.StandardTokenizerFactory"/>
  82.                             <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
  83.                             <filter class="solr.LowerCaseFilterFactory"/>
  84.                     </analyzer>
  85.                     <analyzer type="query">
  86.                             <tokenizer class="solr.StandardTokenizerFactory"/>
  87.                             <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
  88.                             <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
  89.                             <filter class="solr.LowerCaseFilterFactory"/>
  90.                     </analyzer>
  91.             </fieldType>
  92.  
  93.  
  94.  
  95.             <!-- A text field with defaults appropriate for English: it
  96.                  tokenizes with StandardTokenizer, removes English stop words
  97.                  (stopwords.txt), down cases, protects words from protwords.txt, and
  98.                  finally applies Porter's stemming.  The query time analyzer
  99.                  also applies synonyms from synonyms.txt. -->
  100.             <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
  101.                     <analyzer type="index">
  102.                             <tokenizer class="solr.StandardTokenizerFactory"/>
  103.                             <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
  104.                             <filter class="solr.LowerCaseFilterFactory"/>
  105.                             <filter class="solr.EnglishPossessiveFilterFactory"/>
  106.                             <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  107.                             <filter class="solr.PorterStemFilterFactory"/>
  108.                     </analyzer>
  109.                     <analyzer type="query">
  110.                             <tokenizer class="solr.StandardTokenizerFactory"/>
  111.                             <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
  112.                             <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
  113.                             <filter class="solr.LowerCaseFilterFactory"/>
  114.                             <filter class="solr.EnglishPossessiveFilterFactory"/>
  115.                             <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  116.                             <filter class="solr.PorterStemFilterFactory"/>
  117.                     </analyzer>
  118.             </fieldType>
  119.  
  120.             <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
  121.                     <analyzer>
  122.                             <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  123.                             <charFilter class="solr.HTMLStripCharFilterFactory"/>
  124.                     </analyzer>
  125.             </fieldType>
  126.  
  127.             <!-- A text field with defaults appropriate for English, plus
  128.                  aggressive word-splitting and autophrase features enabled.
  129.                  This field is just like text_en, except it adds
  130.                  WordDelimiterFilter to enable splitting and matching of
  131.                  words on case-change, alpha numeric boundaries, and
  132.                  non-alphanumeric chars.  This means certain compound word
  133.                  cases will work, for example query "wi fi" will match
  134.                  document "WiFi" or "wi-fi".  However, other cases will still
  135.                  not match, for example if the query is "wifi" and the
  136.                  document is "wi fi" or if the query is "wi-fi" and the
  137.                  document is "wifi".
  138.                 -->
  139.             <fieldType name="text_en_splitting" class="solr.TextField" autoGeneratePhraseQueries="true" positionIncrementGap="100">
  140.                     <analyzer type="index">
  141.                             <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  142.                             <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
  143.                             <filter class="solr.WordDelimiterFilterFactory" catenateNumbers="1" generateNumberParts="1" splitOnCaseChange="1" generateWordParts="1" catenateAll="0" catenateWords="1"/>
  144.                             <filter class="solr.LowerCaseFilterFactory"/>
  145.                             <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  146.                             <filter class="solr.PorterStemFilterFactory"/>
  147.                     </analyzer>
  148.                     <analyzer type="query">
  149.                             <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  150.                             <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
  151.                             <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
  152.                             <filter class="solr.WordDelimiterFilterFactory" catenateNumbers="0" generateNumberParts="1" splitOnCaseChange="1" generateWordParts="1" catenateAll="0" catenateWords="0"/>
  153.                             <filter class="solr.LowerCaseFilterFactory"/>
  154.                             <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  155.                             <filter class="solr.PorterStemFilterFactory"/>
  156.                     </analyzer>
  157.             </fieldType>
  158.  
  159.             <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
  160.                  but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
  161.             <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  162.               <analyzer>
  163.                 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  164.                 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
  165.                 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  166.                 <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
  167.                 <filter class="solr.LowerCaseFilterFactory"/>
  168.                 <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  169.                 <filter class="solr.EnglishMinimalStemFilterFactory"/>
  170.                 <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
  171.                      possible with WordDelimiterFilter in conjuncton with stemming. -->
  172.                 <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  173.               </analyzer>
  174.             </fieldType>
  175.  
  176.             <!-- Just like text_general except it reverses the characters of
  177.                  each token, to enable more efficient leading wildcard queries. -->
  178.             <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
  179.                     <analyzer type="index">
  180.                             <tokenizer class="solr.StandardTokenizerFactory"/>
  181.                             <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
  182.                             <filter class="solr.LowerCaseFilterFactory"/>
  183.                             <filter class="solr.ReversedWildcardFilterFactory" maxPosQuestion="2" maxFractionAsterisk="0.33" maxPosAsterisk="3" withOriginal="true"/>
  184.                     </analyzer>
  185.                     <analyzer type="query">
  186.                             <tokenizer class="solr.StandardTokenizerFactory"/>
  187.                             <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
  188.                             <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
  189.                             <filter class="solr.LowerCaseFilterFactory"/>
  190.                     </analyzer>
  191.             </fieldType>
  192.  
  193.             <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
  194.               <analyzer>
  195.                 <tokenizer class="solr.StandardTokenizerFactory"/>
  196.                 <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
  197.               </analyzer>
  198.             </fieldtype>
  199.  
  200.             <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
  201.               <analyzer>
  202.                 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  203.                 <!--
  204.                 The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  205.                 a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
  206.                 Attributes of the DelimitedPayloadTokenFilterFactory :
  207.                  "delimiter" - a one character delimiter. Default is | (pipe)
  208.                  "encoder" - how to encode the following value into a playload
  209.                     float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  210.                     integer -> o.a.l.a.p.IntegerEncoder
  211.                     identity -> o.a.l.a.p.IdentityEncoder
  212.                     Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
  213.                  -->
  214.                 <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
  215.               </analyzer>
  216.             </fieldtype>
  217.  
  218.             <!-- lowercases the entire field value, keeping it as a single token.  -->
  219.             <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
  220.               <analyzer>
  221.                 <tokenizer class="solr.KeywordTokenizerFactory"/>
  222.                 <filter class="solr.LowerCaseFilterFactory" />
  223.               </analyzer>
  224.             </fieldType>
  225.  
  226.             <fieldType name="url" class="solr.TextField" positionIncrementGap="100">
  227.               <analyzer>
  228.                 <tokenizer class="solr.StandardTokenizerFactory"/>
  229.                    <filter class="solr.LowerCaseFilterFactory"/>
  230.                    <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"/>
  231.               </analyzer>
  232.             </fieldType>
  233.  
  234.  
  235.             <fieldType name="text_path" class="solr.TextField" positionIncrementGap="100">
  236.               <analyzer>
  237.                 <tokenizer class="solr.PathHierarchyTokenizerFactory"/>
  238.               </analyzer>
  239.             </fieldType>
  240.  
  241.             <!-- since fields of this type are by default not stored or indexed,
  242.                  any data added to them will be ignored outright.  -->
  243.             <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
  244.  
  245.             <fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
  246.  
  247.             <fieldType name="point" class="solr.PointType" subFieldSuffix="_d" dimension="2"/>
  248.             <fieldType name="random" class="solr.RandomSortField" indexed="true"/>
  249.             <fieldType name="strings" class="solr.StrField" sortMissingLast="true" multiValued="true"/>
  250.             <fieldType name="tdates" class="solr.TrieDateField" positionIncrementGap="0" multiValued="true" precisionStep="6"/>
  251.  
  252.          </types>
  253.     <fields>
  254.         <field name="id" type="string" stored="true" indexed="true"/>
  255.  
  256.         <!-- xpath filter fields -->
  257.         <field name="articleTitle" type="text" stored="true" indexed="true" />
  258.         <field name="articleAuthor" type="text" stored="true" indexed="true" />
  259.         <field name="articleContent" type="text" stored="true" indexed="true" />
  260.  
  261.         <!-- core fields -->
  262.         <field name="segment" type="string" stored="true" indexed="false"/>
  263.         <field name="digest" type="string" stored="true" indexed="false"/>
  264.         <field name="boost" type="float" stored="true" indexed="false"/>
  265.  
  266.         <!-- fields for index-basic plugin -->
  267.         <field name="host" type="url" stored="false" indexed="true"/>
  268.         <field name="site" type="string" stored="false" indexed="true"/>
  269.         <field name="url" type="url" stored="true" indexed="true"
  270.            required="true"/>
  271.         <field name="content" type="text" stored="false" indexed="true"/>
  272.         <field name="title" type="text" stored="true" indexed="true"/>
  273.         <field name="cache" type="string" stored="true" indexed="false"/>
  274.         <field name="tstamp" type="date" stored="true" indexed="false"/>
  275.  
  276.         <!-- fields for index-anchor plugin -->
  277.         <field name="anchor" type="string" stored="true" indexed="true"
  278.            multiValued="true"/>
  279.  
  280.         <!-- fields for index-more plugin -->
  281.         <field name="type" type="string" stored="true" indexed="true"
  282.            multiValued="true"/>
  283.         <field name="contentLength" type="long" stored="true"
  284.            indexed="false"/>
  285.         <field name="lastModified" type="date" stored="true"
  286.            indexed="false"/>
  287.         <field name="date" type="date" stored="true" indexed="true"/>
  288.  
  289.         <!-- fields for languageidentifier plugin -->
  290.         <field name="lang" type="string" stored="true" indexed="true"/>
  291.         <!-- fields for subcollection plugin -->
  292.         <field name="subcollection" type="string" stored="true"
  293.            indexed="true" multiValued="true"/>
  294.  
  295.         <!-- fields for feed plugin (tag is also used by microformats-reltag)-->
  296.         <field name="author" type="string" stored="true" indexed="true"/>
  297.         <field name="tag" type="string" stored="true" indexed="true" multiValued="true"/>
  298.         <field name="feed" type="string" stored="true" indexed="true"/>
  299.         <field name="publishedDate" type="date" stored="true"
  300.            indexed="true"/>
  301.         <field name="updatedDate" type="date" stored="true"
  302.            indexed="true"/>
  303.  
  304.         <!-- fields for creativecommons plugin -->
  305.         <field name="cc" type="string" stored="true" indexed="true"
  306.            multiValued="true"/>
  307.  
  308.             <field name="_version_" type="long" indexed="true" stored="true" />
  309.     </fields>
  310.     <uniqueKey>id</uniqueKey>
  311.     <defaultSearchField>articleContent</defaultSearchField>
  312.     <solrQueryParser defaultOperator="OR"/>
  313. </schema>
RAW Paste Data
Top