Guest User

Untitled

a guest
Dec 17th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 31.00 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  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. <!--  
  20. This is the Solr schema file. This file should be named "schema.xml" and
  21. should be in the conf directory under the solr home
  22. (i.e. ./solr/conf/schema.xml by default)
  23. or located where the classloader for the Solr webapp can find it.
  24.  
  25. This example schema is the recommended starting point for users.
  26. It should be kept correct and concise, usable out-of-the-box.
  27.  
  28. For more information, on how to customize this file, please see
  29. http://wiki.apache.org/solr/SchemaXml
  30.  
  31. PERFORMANCE NOTE: this schema includes many optional features and should not
  32. be used for benchmarking.  To improve performance one could
  33.  - set stored="false" for all fields possible (esp large fields) when you
  34.    only need to search on the field but don't need to return the original
  35.    value.
  36.  - set indexed="false" if you don't need to search on the field, but only
  37.    return the field as a result of searching on other indexed fields.
  38.  - remove all unneeded copyField statements
  39.  - for best index size and searching performance, set "index" to false
  40.    for all general text fields, use copyField to copy them to the
  41.    catchall "text" field, and use that for searching.
  42.  - For maximum indexing performance, use the StreamingUpdateSolrServer
  43.    java client.
  44.  - Remember to run the JVM in server mode, and use a higher logging level
  45.    that avoids logging every request
  46. -->
  47.  
  48. <schema name="prox" version="1.2">
  49.   <!-- attribute "name" is the name of this schema and is only used for display purposes.
  50.       Applications should change this to reflect the nature of the search collection.
  51.       version="1.2" is Solr's version number for the schema syntax and semantics.  It should
  52.       not normally be changed by applications.
  53.       1.0: multiValued attribute did not exist, all fields are multiValued by nature
  54.       1.1: multiValued attribute introduced, false by default
  55.       1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
  56.     -->
  57.  
  58.   <types>
  59.     <!-- field type definitions. The "name" attribute is
  60.       just a label to be used by field definitions.  The "class"
  61.       attribute and any other attributes determine the real
  62.       behavior of the fieldType.
  63.         Class names starting with "solr" refer to java classes in the
  64.       org.apache.solr.analysis package.
  65.    -->
  66.  
  67.     <!-- The StrField type is not analyzed, but indexed/stored verbatim.  
  68.       - StrField and TextField support an optional compressThreshold which
  69.       limits compression (if enabled in the derived fields) to values which
  70.       exceed a certain size (in characters).
  71.    -->
  72.     <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
  73.  
  74.     <!-- boolean type: "true" or "false" -->
  75.     <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
  76.     <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
  77.     <fieldtype name="binary" class="solr.BinaryField"/>
  78.  
  79.     <!-- The optional sortMissingLast and sortMissingFirst attributes are
  80.         currently supported on types that are sorted internally as strings.
  81.            This includes "string","boolean","sint","slong","sfloat","sdouble","pdate"
  82.       - If sortMissingLast="true", then a sort on this field will cause documents
  83.         without the field to come after documents with the field,
  84.         regardless of the requested sort order (asc or desc).
  85.       - If sortMissingFirst="true", then a sort on this field will cause documents
  86.         without the field to come before documents with the field,
  87.         regardless of the requested sort order.
  88.       - If sortMissingLast="false" and sortMissingFirst="false" (the default),
  89.         then default lucene sorting will be used which places docs without the
  90.         field first in an ascending sort and last in a descending sort.
  91.    -->    
  92.  
  93.     <!--
  94.      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
  95.    -->
  96.     <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  97.     <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  98.     <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  99.     <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  100.  
  101.     <!--
  102.     Numeric field types that index each value at various levels of precision
  103.     to accelerate range queries when the number of values between the range
  104.     endpoints is large. See the javadoc for NumericRangeQuery for internal
  105.     implementation details.
  106.  
  107.     Smaller precisionStep values (specified in bits) will lead to more tokens
  108.     indexed per value, slightly larger index size, and faster range queries.
  109.     A precisionStep of 0 disables indexing at different precision levels.
  110.    -->
  111.     <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  112.     <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  113.     <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  114.     <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  115.  
  116.     <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  117.         is a more restricted form of the canonical representation of dateTime
  118.         http://www.w3.org/TR/xmlschema-2/#dateTime    
  119.         The trailing "Z" designates UTC time and is mandatory.
  120.         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  121.         All other components are mandatory.
  122.  
  123.         Expressions can also be used to denote calculations that should be
  124.         performed relative to "NOW" to determine the value, ie...
  125.  
  126.               NOW/HOUR
  127.                  ... Round to the start of the current hour
  128.               NOW-1DAY
  129.                  ... Exactly 1 day prior to now
  130.               NOW/DAY+6MONTHS+3DAYS
  131.                  ... 6 months and 3 days in the future from the start of
  132.                      the current day
  133.                      
  134.         Consult the DateField javadocs for more information.
  135.  
  136.         Note: For faster range queries, consider the tdate type
  137.      -->
  138.     <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
  139.  
  140.     <!-- A Trie based date field for faster date range queries and date faceting. -->
  141.     <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
  142.  
  143.     <!-- Spell checker -->
  144.     <!--
  145.     <fieldType name="textSpell" class="solr.TextField">
  146.     <analyzer type="index">
  147.         <tokenizer class="solr.StandardTokenizerFactory"/>
  148.         <filter class="solr.LowerCaseFilterFactory"/>
  149.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  150.         <filter class="solr.StandardFilterFactory"/>
  151.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  152.     </analyzer>
  153.     <analyzer type="query">
  154.         <tokenizer class="solr.StandardTokenizerFactory"/>
  155.         <filter class="solr.LowerCaseFilterFactory"/>
  156.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  157.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  158.         <filter class="solr.StandardFilterFactory"/>
  159.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  160.     </analyzer>
  161.     </fieldType>
  162.     -->
  163.     <!--
  164.      Note:
  165.      These should only be used for compatibility with existing indexes (created with older Solr versions)
  166.      or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
  167.  
  168.      Plain numeric field types that store and index the text
  169.      value verbatim (and hence don't support range queries, since the
  170.      lexicographic ordering isn't equal to the numeric ordering)
  171.    -->
  172.     <fieldType name="pint" class="solr.IntField" omitNorms="true"/>
  173.     <fieldType name="plong" class="solr.LongField" omitNorms="true"/>
  174.     <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
  175.     <fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
  176.     <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
  177.  
  178.  
  179.     <!--
  180.      Note:
  181.      These should only be used for compatibility with existing indexes (created with older Solr versions)
  182.      or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
  183.  
  184.      Numeric field types that manipulate the value into
  185.      a string value that isn't human-readable in its internal form,
  186.      but with a lexicographic ordering the same as the numeric ordering,
  187.      so that range queries work correctly.
  188.    -->
  189.     <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
  190.     <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
  191.     <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
  192.     <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
  193.  
  194.  
  195.     <!-- The "RandomSortField" is not used to store or search any
  196.         data.  You can declare fields of this type it in your schema
  197.         to generate pseudo-random orderings of your docs for sorting
  198.         purposes.  The ordering is generated based on the field name
  199.         and the version of the index, As long as the index version
  200.         remains unchanged, and the same field name is reused,
  201.         the ordering of the docs will be consistent.  
  202.         If you want different psuedo-random orderings of documents,
  203.         for the same version of the index, use a dynamicField and
  204.         change the name
  205.     -->
  206.     <fieldType name="random" class="solr.RandomSortField" indexed="true" />
  207.  
  208.     <!-- solr.TextField allows the specification of custom text analyzers
  209.         specified as a tokenizer and a list of token filters. Different
  210.         analyzers may be specified for indexing and querying.
  211.  
  212.         The optional positionIncrementGap puts space between multiple fields of
  213.         this type on the same document, with the purpose of preventing false phrase
  214.         matching across fields.
  215.  
  216.         For more info on customizing your analyzer chain, please see
  217.         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  218.     -->
  219.  
  220.     <!-- One can also specify an existing Analyzer class that has a
  221.         default constructor via the class attribute on the analyzer element
  222.    <fieldType name="text_greek" class="solr.TextField">
  223.      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
  224.    </fieldType>
  225.    -->
  226.  
  227.     <!-- A text field that only splits on whitespace for exact matching of words -->
  228.     <fieldType name="tagsfield" class="solr.TextField" positionIncrementGap="100">
  229.       <analyzer>
  230.           <tokenizer class="solr.PatternTokenizerFactory" pattern=",\s*" />
  231.       </analyzer>
  232.     </fieldType>
  233.  
  234.     <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
  235.        words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
  236.        so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
  237.        Synonyms and stopwords are customized by external files, and stemming is enabled.
  238.        -->
  239.     <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
  240.       <analyzer type="index">
  241.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  242.         <!-- in this example, we will only use synonyms at query time
  243.        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  244.        -->
  245.         <!-- Case insensitive stop word removal.
  246.          add enablePositionIncrements=true in both the index and query
  247.          analyzers to leave a 'gap' for more accurate phrase queries.
  248.        -->
  249.         <filter class="solr.StopFilterFactory"
  250.                ignoreCase="true"
  251.                words="stopwords.txt"
  252.                enablePositionIncrements="true"
  253.                />
  254.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
  255.         <filter class="solr.LowerCaseFilterFactory"/>
  256.         <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
  257.       </analyzer>
  258.       <analyzer type="query">
  259.         <filter class="solr.ASCIIFoldingFilterFactory"/>
  260.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  261.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  262.         <filter class="solr.StopFilterFactory"
  263.                ignoreCase="true"
  264.                words="stopwords.txt"
  265.                enablePositionIncrements="true"
  266.                />
  267.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
  268.         <filter class="solr.LowerCaseFilterFactory"/>
  269.         <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
  270.       </analyzer>
  271.     </fieldType>
  272.  
  273.  
  274.     <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
  275.         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
  276.     <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
  277.       <analyzer>
  278.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  279.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
  280.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  281.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
  282.         <filter class="solr.LowerCaseFilterFactory"/>
  283.         <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
  284.         <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
  285.             possible with WordDelimiterFilter in conjuncton with stemming. -->
  286.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  287.       </analyzer>
  288.     </fieldType>
  289.  
  290.  
  291.     <!-- A general unstemmed text field - good if one does not know the language of the field -->
  292.     <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
  293.       <analyzer type="index">
  294.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  295.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  296.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
  297.         <filter class="solr.LowerCaseFilterFactory"/>
  298.       </analyzer>
  299.       <analyzer type="query">
  300.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  301.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  302.         <filter class="solr.StopFilterFactory"
  303.                ignoreCase="true"
  304.                words="stopwords.txt"
  305.                enablePositionIncrements="true"
  306.                />
  307.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
  308.         <filter class="solr.LowerCaseFilterFactory"/>
  309.       </analyzer>
  310.     </fieldType>
  311.  
  312.  
  313.     <!-- A general unstemmed text field that indexes tokens normally and also
  314.         reversed (via ReversedWildcardFilterFactory), to enable more efficient
  315.      leading wildcard queries. -->
  316.     <fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
  317.       <analyzer type="index">
  318.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  319.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  320.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
  321.         <filter class="solr.LowerCaseFilterFactory"/>
  322.         <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
  323.           maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
  324.       </analyzer>
  325.       <analyzer type="query">
  326.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  327.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  328.         <filter class="solr.StopFilterFactory"
  329.                ignoreCase="true"
  330.                words="stopwords.txt"
  331.                enablePositionIncrements="true"
  332.                />
  333.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
  334.         <filter class="solr.LowerCaseFilterFactory"/>
  335.       </analyzer>
  336.     </fieldType>
  337.  
  338.     <!-- charFilter + WhitespaceTokenizer  -->
  339.     <!--
  340.    <fieldType name="textCharNorm" class="solr.TextField" positionIncrementGap="100" >
  341.      <analyzer>
  342.        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
  343.        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  344.      </analyzer>
  345.    </fieldType>
  346.    -->
  347.  
  348.     <!-- This is an example of using the KeywordTokenizer along
  349.         With various TokenFilterFactories to produce a sortable field
  350.         that does not include some properties of the source text
  351.      -->
  352.     <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
  353.       <analyzer>
  354.         <!-- KeywordTokenizer does no actual tokenizing, so the entire
  355.             input string is preserved as a single token
  356.          -->
  357.         <tokenizer class="solr.KeywordTokenizerFactory"/>
  358.         <!-- The LowerCase TokenFilter does what you expect, which can be
  359.             when you want your sorting to be case insensitive
  360.          -->
  361.         <filter class="solr.LowerCaseFilterFactory" />
  362.         <!-- The TrimFilter removes any leading or trailing whitespace -->
  363.         <filter class="solr.TrimFilterFactory" />
  364.         <!-- The PatternReplaceFilter gives you the flexibility to use
  365.             Java Regular expression to replace any sequence of characters
  366.             matching a pattern with an arbitrary replacement string,
  367.             which may include back references to portions of the original
  368.             string matched by the pattern.
  369.            
  370.             See the Java Regular Expression documentation for more
  371.             information on pattern and replacement string syntax.
  372.            
  373.             http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
  374.          -->
  375.         <filter class="solr.PatternReplaceFilterFactory"
  376.                pattern="([^a-z])" replacement="" replace="all"
  377.        />
  378.       </analyzer>
  379.     </fieldType>
  380.    
  381.     <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
  382.       <analyzer>
  383.         <tokenizer class="solr.StandardTokenizerFactory"/>
  384.         <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
  385.       </analyzer>
  386.     </fieldtype>
  387.  
  388.     <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
  389.       <analyzer>
  390.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  391.         <!--
  392.        The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  393.        a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
  394.        Attributes of the DelimitedPayloadTokenFilterFactory :
  395.         "delimiter" - a one character delimiter. Default is | (pipe)
  396.      "encoder" - how to encode the following value into a playload
  397.         float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  398.         integer -> o.a.l.a.p.IntegerEncoder
  399.         identity -> o.a.l.a.p.IdentityEncoder
  400.            Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
  401.         -->
  402.         <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
  403.       </analyzer>
  404.     </fieldtype>
  405.  
  406.     <!-- lowercases the entire field value, keeping it as a single token.  -->
  407.     <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
  408.       <analyzer>
  409.         <tokenizer class="solr.KeywordTokenizerFactory"/>
  410.         <filter class="solr.LowerCaseFilterFactory" />
  411.       </analyzer>
  412.     </fieldType>
  413.  
  414.  
  415.     <!-- since fields of this type are by default not stored or indexed,
  416.         any data added to them will be ignored outright.  -->
  417.     <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
  418.  
  419.  </types>
  420.  
  421.  
  422.  <fields>
  423.    <!-- Valid attributes for fields:
  424.     name: mandatory - the name for the field
  425.     type: mandatory - the name of a previously defined type from the
  426.       <types> section
  427.     indexed: true if this field should be indexed (searchable or sortable)
  428.     stored: true if this field should be retrievable
  429.     compressed: [false] if this field should be stored using gzip compression
  430.       (this will only apply if the field type is compressable; among
  431.       the standard field types, only TextField and StrField are)
  432.     multiValued: true if this field may contain multiple values per document
  433.     omitNorms: (expert) set to true to omit the norms associated with
  434.       this field (this disables length normalization and index-time
  435.       boosting for the field, and saves some memory).  Only full-text
  436.       fields or fields that need an index-time boost need norms.
  437.     termVectors: [false] set to true to store the term vector for a
  438.       given field.
  439.       When using MoreLikeThis, fields used for similarity should be
  440.       stored for best performance.
  441.     termPositions: Store position information with the term vector.  
  442.       This will increase storage costs.
  443.     termOffsets: Store offset information with the term vector. This
  444.       will increase storage costs.
  445.     default: a value that should be used if no value is specified
  446.       when adding a document.
  447.   -->
  448.  
  449. <!--
  450.   <field name="id" type="string" indexed="true" stored="true" required="true" />
  451.   <field name="sku" type="textTight" indexed="true" stored="true" omitNorms="true"/>
  452.   <field name="name" type="textgen" indexed="true" stored="true"/>
  453.   <field name="alphaNameSort" type="alphaOnlySort" indexed="true" stored="false"/>
  454.   <field name="manu" type="textgen" indexed="true" stored="true" omitNorms="true"/>
  455.   <field name="cat" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true" />
  456.   <field name="features" type="text" indexed="true" stored="true" multiValued="true"/>
  457.   <field name="includes" type="text" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
  458.  
  459.   <field name="weight" type="float" indexed="true" stored="true"/>
  460.   <field name="price"  type="float" indexed="true" stored="true"/>
  461.   <field name="popularity" type="int" indexed="true" stored="true" />
  462.   <field name="inStock" type="boolean" indexed="true" stored="true" />
  463. -->
  464.  
  465.    <field name="id" type="string" indexed="true" stored="true" required="true" />
  466.  
  467.    <!-- Common metadata fields, named specifically to match up with
  468.     SolrCell metadata when parsing rich documents such as Word, PDF.
  469.     Some fields are multiValued only because Tika currently may return
  470.     multiple values for them.
  471.   -->
  472.    <field name="title" type="text" indexed="true" stored="true" />
  473.    <field name="url" type="string" indexed="false" stored="true" />
  474.    <field name="thumb_small" type="string" indexed="false" stored="true" />
  475.    <field name="thumb_medium" type="string" indexed="false" stored="true" />
  476.    <field name="thumb_large" type="string" indexed="false" stored="true" />
  477.    <field name="duration" type="int" indexed="true" stored="true" />
  478.    <field name="date" type="date" dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss" indexed="true" stored="true" />
  479.    <field name="views" type="int" indexed="true" stored="true" />
  480.    <field name="rating" type="int" indexed="true" stored="true" default="3" />
  481.    <field name="source" type="string" indexed="true" stored="true" />
  482.    <field name="tags" type="tagsfield" indexed="true" stored="true"/>
  483.    
  484.    <!--
  485.   <field name="spell" type="textSpell" index="true" stored="false"/>
  486.   <copyField source="title" dest="spell" />
  487.   -->
  488.    
  489.    <!-- catchall field, containing all other searchable text fields (implemented
  490.        via copyField further on in this schema  -->
  491. <!--
  492.   <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
  493. -->
  494.  
  495.    <!-- catchall text field that indexes tokens both normally and in reverse for efficient
  496.        leading wildcard queries. -->
  497. <!--
  498.   <field name="text_rev" type="text_rev" indexed="true" stored="false" multiValued="true"/>
  499. -->
  500.  
  501.    <!-- non-tokenized version of manufacturer to make it easier to sort or group
  502.        results by manufacturer.  copied from "manu" via copyField -->
  503. <!--
  504.   <field name="manu_exact" type="string" indexed="true" stored="false"/>
  505.  
  506.   <field name="payloads" type="payloads" indexed="true" stored="true"/>
  507. -->
  508.  
  509.    <!-- Uncommenting the following will create a "timestamp" field using
  510.        a default value of "NOW" to indicate when each document was indexed.
  511.     -->
  512.    <!--
  513.   <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
  514.     -->
  515.    
  516.  
  517.    <!-- Dynamic field definitions.  If a field name is not found, dynamicFields
  518.        will be used if the name matches any of the patterns.
  519.        RESTRICTION: the glob-like pattern in the name attribute must have
  520.        a "*" only at the start or the end.
  521.        EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)
  522.        Longer patterns will be matched first.  if equal size patterns
  523.        both match, the first appearing in the schema will be used.  -->
  524. <!--
  525.   <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>
  526.   <dynamicField name="*_s"  type="string"  indexed="true"  stored="true"/>
  527.   <dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/>
  528.   <dynamicField name="*_t"  type="text"    indexed="true"  stored="true"/>
  529.   <dynamicField name="*_b"  type="boolean" indexed="true"  stored="true"/>
  530.   <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>
  531.   <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>
  532.   <dynamicField name="*_dt" type="date"    indexed="true"  stored="true"/>
  533. -->
  534.  
  535.    <!-- some trie-coded dynamic fields for faster range queries -->
  536. <!--
  537.   <dynamicField name="*_ti" type="tint"    indexed="true"  stored="true"/>
  538.   <dynamicField name="*_tl" type="tlong"   indexed="true"  stored="true"/>
  539.   <dynamicField name="*_tf" type="tfloat"  indexed="true"  stored="true"/>
  540.   <dynamicField name="*_td" type="tdouble" indexed="true"  stored="true"/>
  541.   <dynamicField name="*_tdt" type="tdate"  indexed="true"  stored="true"/>
  542.  
  543.   <dynamicField name="*_pi"  type="pint"    indexed="true"  stored="true"/>
  544.  
  545.   <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
  546.   <dynamicField name="attr_*" type="textgen" indexed="true" stored="true" multiValued="true"/>
  547.  
  548.   <dynamicField name="random_*" type="random" />
  549. -->
  550.  
  551.    <!-- uncomment the following to ignore any fields that don't already match an existing
  552.        field name or dynamic field, rather than reporting them as an error.
  553.        alternately, change the type="ignored" to some other type e.g. "text" if you want
  554.        unknown fields indexed and/or stored by default -->
  555.    <!--dynamicField name="*" type="ignored" multiValued="true" /-->
  556.    
  557.  </fields>
  558.  
  559.  <!-- Field to use to determine and enforce document uniqueness.
  560.      Unless this field is marked with required="false", it will be a required field
  561.   -->
  562.  <uniqueKey>id</uniqueKey>
  563.  
  564.  <!-- field for the QueryParser to use when an explicit fieldname is absent -->
  565.  <defaultSearchField>title</defaultSearchField>
  566.  
  567.  <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
  568.  <solrQueryParser defaultOperator="OR"/>
  569.  
  570.   <!-- copyField commands copy one field to another at the time a document
  571.        is added to the index.  It's used either to index the same field differently,
  572.        or to add multiple fields to the same field for easier/faster searching.  -->
  573.  
  574. <!--
  575.   <copyField source="cat" dest="text"/>
  576.   <copyField source="name" dest="text"/>
  577.   <copyField source="manu" dest="text"/>
  578.   <copyField source="features" dest="text"/>
  579.   <copyField source="includes" dest="text"/>
  580.   <copyField source="manu" dest="manu_exact"/>
  581. -->
  582.    
  583.    <!-- Above, multiple source fields are copied to the [text] field.
  584.       Another way to map multiple source fields to the same
  585.       destination field is to use the dynamic field syntax.
  586.       copyField also supports a maxChars to copy setting.  -->
  587.        
  588.    <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
  589.  
  590.    <!-- copy name to alphaNameSort, a field designed for sorting by name -->
  591.    <!-- <copyField source="name" dest="alphaNameSort"/> -->
  592.  
  593.  
  594.  <!-- Similarity is the scoring routine for each document vs. a query.
  595.      A custom similarity may be specified here, but the default is fine
  596.      for most applications.  -->
  597.  <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
  598.  <!-- ... OR ...
  599.      Specify a SimilarityFactory class name implementation
  600.      allowing parameters to be used.
  601. -->
  602.  <!--
  603. <similarity class="com.example.solr.CustomSimilarityFactory">
  604.   <str name="paramkey">param value</str>
  605. </similarity>
  606. -->
  607. </schema>
Add Comment
Please, Sign In to add comment