SHARE
TWEET

Schema of solar

a guest Jan 21st, 2014 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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="example" version="1.5">
  49.   <!-- attribute "name" is the name of this schema and is only used for display purposes.
  50.       version="x.y" is Solr's version number for the schema syntax and
  51.       semantics.  It should not normally be changed by applications.
  52.  
  53.       1.0: multiValued attribute did not exist, all fields are multiValued
  54.            by nature
  55.       1.1: multiValued attribute introduced, false by default
  56.       1.2: omitTermFreqAndPositions attribute introduced, true by default
  57.            except for text fields.
  58.       1.3: removed optional field compress feature
  59.       1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
  60.            behavior when a single string produces multiple tokens.  Defaults
  61.            to off for version >= 1.4
  62.       1.5: omitNorms defaults to true for primitive field types
  63.            (int, float, boolean, string...)
  64.     -->
  65.  
  66.  <fields>
  67.    <!-- Valid attributes for fields:
  68.     name: mandatory - the name for the field
  69.     type: mandatory - the name of a field type from the
  70.       <types> fieldType section
  71.     indexed: true if this field should be indexed (searchable or sortable)
  72.     stored: true if this field should be retrievable
  73.     docValues: true if this field should have doc values. Doc values are
  74.       useful for faceting, grouping, sorting and function queries. Although not
  75.       required, doc values will make the index faster to load, more
  76.       NRT-friendly and more memory-efficient. They however come with some
  77.       limitations: they are currently only supported by StrField, UUIDField
  78.       and all Trie*Fields, and depending on the field type, they might
  79.       require the field to be single-valued, be required or have a default
  80.       value (check the documentation of the field type you're interested in
  81.       for more information)
  82.     multiValued: true if this field may contain multiple values per document
  83.     omitNorms: (expert) set to true to omit the norms associated with
  84.       this field (this disables length normalization and index-time
  85.       boosting for the field, and saves some memory).  Only full-text
  86.       fields or fields that need an index-time boost need norms.
  87.       Norms are omitted for primitive (non-analyzed) types by default.
  88.     termVectors: [false] set to true to store the term vector for a
  89.       given field.
  90.       When using MoreLikeThis, fields used for similarity should be
  91.       stored for best performance.
  92.     termPositions: Store position information with the term vector.  
  93.       This will increase storage costs.
  94.     termOffsets: Store offset information with the term vector. This
  95.       will increase storage costs.
  96.     required: The field is required.  It will throw an error if the
  97.       value does not exist
  98.     default: a value that should be used if no value is specified
  99.       when adding a document.
  100.   -->
  101.  
  102.    <!-- field names should consist of alphanumeric or underscore characters only and
  103.      not start with a digit.  This is not currently strictly enforced,
  104.      but other field names will not have first class support from all components
  105.      and back compatibility is not guaranteed.  Names with both leading and
  106.      trailing underscores (e.g. _version_) are reserved.
  107.   -->
  108.  
  109.    <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
  110.      or Solr won't start. _version_ and update log are required for SolrCloud
  111.   -->
  112.    <field name="_version_" type="long" indexed="true" stored="true"/>
  113.    
  114.    <!-- points to the root document of a block of nested documents. Required for nested
  115.      document support, may be removed otherwise
  116.   -->
  117.    <field name="_root_" type="string" indexed="true" stored="false"/>
  118.  
  119.    <!-- Only remove the "id" field if you have a very good reason to. While not strictly
  120.     required, it is highly recommended. A <uniqueKey> is present in almost all Solr
  121.     installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".
  122.   -->  
  123.    <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
  124.        
  125.    <field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/>
  126.    <field name="name" type="text_general" indexed="true" stored="true"/>
  127.    <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/>
  128.    <field name="cat" type="string" indexed="true" stored="true" multiValued="true"/>
  129.    <field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/>
  130.    <field name="includes" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
  131.  
  132.    <field name="weight" type="float" indexed="true" stored="true"/>
  133.    <field name="price"  type="float" indexed="true" stored="true"/>
  134.    <field name="popularity" type="int" indexed="true" stored="true" />
  135.    <field name="inStock" type="boolean" indexed="true" stored="true" />
  136.  
  137.    <field name="store" type="location" indexed="true" stored="true"/>
  138.    
  139.         <field name="where" type="text_general" indexed="true" stored="true" multiValued="true"/>
  140.         <field name="when" type="text_general" indexed="true" stored="true" multiValued="true"/>
  141.         <field name="street" type="text_general" indexed="true" stored="true" multiValued="true"/>
  142.         <field name="district" type="text_general" indexed="true" stored="true" multiValued="true"/>
  143.         <field name="zone" type="text_general" indexed="true" stored="true" multiValued="true"/>
  144.         <field name="postal_code" type="int" indexed="true" stored="true"/>
  145.         <field name="phone" type="int" indexed="true" stored="true" multiValued="true"/>
  146.         <field name="desc" type="text_general" indexed="true" stored="true" multiValued="true"/>
  147.         <field name="schedules" type="text_general" indexed="true" stored="true" multiValued="true"/>
  148.  
  149.    <!-- Common metadata fields, named specifically to match up with
  150.     SolrCell metadata when parsing rich documents such as Word, PDF.
  151.     Some fields are multiValued only because Tika currently may return
  152.     multiple values for them. Some metadata is parsed from the documents,
  153.     but there are some which come from the client context:
  154.       "content_type": From the HTTP headers of incoming stream
  155.       "resourcename": From SolrCell request param resource.name
  156.   -->
  157.    <field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
  158.    <field name="subject" type="text_general" indexed="true" stored="true"/>
  159.    <field name="description" type="text_general" indexed="true" stored="true"/>
  160.    <field name="comments" type="text_general" indexed="true" stored="true"/>
  161.    <field name="author" type="text_general" indexed="true" stored="true"/>
  162.    <field name="keywords" type="text_general" indexed="true" stored="true"/>
  163.    <field name="category" type="text_general" indexed="true" stored="true"/>
  164.    <field name="resourcename" type="text_general" indexed="true" stored="true"/>
  165.    <field name="url" type="text_general" indexed="true" stored="true"/>
  166.    <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
  167.    <field name="last_modified" type="date" indexed="true" stored="true"/>
  168.    <field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
  169.  
  170.    <!-- Main body of document extracted by SolrCell.
  171.        NOTE: This field is not indexed by default, since it is also copied to "text"
  172.        using copyField below. This is to save space. Use this field for returning and
  173.        highlighting document content. Use the "text" field to search the content. -->
  174.    <field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/>
  175.    
  176.  
  177.    <!-- catchall field, containing all other searchable text fields (implemented
  178.        via copyField further on in this schema  -->
  179.    <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
  180.  
  181.    <!-- catchall text field that indexes tokens both normally and in reverse for efficient
  182.        leading wildcard queries. -->
  183.    <field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/>
  184.  
  185.    <!-- non-tokenized version of manufacturer to make it easier to sort or group
  186.        results by manufacturer.  copied from "manu" via copyField -->
  187.    <field name="manu_exact" type="string" indexed="true" stored="false"/>
  188.  
  189.    <field name="payloads" type="payloads" indexed="true" stored="true"/>
  190.  
  191.  
  192.    <!--
  193.     Some fields such as popularity and manu_exact could be modified to
  194.     leverage doc values:
  195.     <field name="popularity" type="int" indexed="true" stored="true" docValues="true" />
  196.     <field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" />
  197.     <field name="cat" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
  198.  
  199.  
  200.     Although it would make indexing slightly slower and the index bigger, it
  201.     would also make the index faster to load, more memory-efficient and more
  202.     NRT-friendly.
  203.     -->
  204.  
  205.    <!-- Dynamic field definitions allow using convention over configuration
  206.       for fields via the specification of patterns to match field names.
  207.       EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)
  208.       RESTRICTION: the glob-like pattern in the name attribute must have
  209.       a "*" only at the start or the end.  -->
  210.    
  211.    <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>
  212.    <dynamicField name="*_is" type="int"    indexed="true"  stored="true"  multiValued="true"/>
  213.    <dynamicField name="*_s"  type="string"  indexed="true"  stored="true" />
  214.    <dynamicField name="*_ss" type="string"  indexed="true"  stored="true" multiValued="true"/>
  215.    <dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/>
  216.    <dynamicField name="*_ls" type="long"   indexed="true"  stored="true"  multiValued="true"/>
  217.    <dynamicField name="*_t"  type="text_general"    indexed="true"  stored="true"/>
  218.    <dynamicField name="*_txt" type="text_general"   indexed="true"  stored="true" multiValued="true"/>
  219.    <dynamicField name="*_en"  type="text_en"    indexed="true"  stored="true" multiValued="true"/>
  220.    <dynamicField name="*_b"  type="boolean" indexed="true" stored="true"/>
  221.    <dynamicField name="*_bs" type="boolean" indexed="true" stored="true"  multiValued="true"/>
  222.    <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>
  223.    <dynamicField name="*_fs" type="float"  indexed="true"  stored="true"  multiValued="true"/>
  224.    <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>
  225.    <dynamicField name="*_ds" type="double" indexed="true"  stored="true"  multiValued="true"/>
  226.  
  227.    <!-- Type used to index the lat and lon components for the "location" FieldType -->
  228.    <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false" />
  229.  
  230.    <dynamicField name="*_dt"  type="date"    indexed="true"  stored="true"/>
  231.    <dynamicField name="*_dts" type="date"    indexed="true"  stored="true" multiValued="true"/>
  232.    <dynamicField name="*_p"  type="location" indexed="true" stored="true"/>
  233.  
  234.    <!-- some trie-coded dynamic fields for faster range queries -->
  235.    <dynamicField name="*_ti" type="tint"    indexed="true"  stored="true"/>
  236.    <dynamicField name="*_tl" type="tlong"   indexed="true"  stored="true"/>
  237.    <dynamicField name="*_tf" type="tfloat"  indexed="true"  stored="true"/>
  238.    <dynamicField name="*_td" type="tdouble" indexed="true"  stored="true"/>
  239.    <dynamicField name="*_tdt" type="tdate"  indexed="true"  stored="true"/>
  240.  
  241.    <dynamicField name="*_pi"  type="pint"    indexed="true"  stored="true"/>
  242.    <dynamicField name="*_c"   type="currency" indexed="true"  stored="true"/>
  243.  
  244.    <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
  245.    <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
  246.  
  247.    <dynamicField name="random_*" type="random" />
  248.  
  249.    <!-- uncomment the following to ignore any fields that don't already match an existing
  250.        field name or dynamic field, rather than reporting them as an error.
  251.        alternately, change the type="ignored" to some other type e.g. "text" if you want
  252.        unknown fields indexed and/or stored by default -->
  253.    <!--dynamicField name="*" type="ignored" multiValued="true" /-->
  254.    
  255.  </fields>
  256.  
  257.  
  258.  <!-- Field to use to determine and enforce document uniqueness.
  259.      Unless this field is marked with required="false", it will be a required field
  260.   -->
  261.  <uniqueKey>id</uniqueKey>
  262.  
  263.  <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when
  264.  parsing a query string that isn't explicit about the field.  Machine (non-user)
  265.  generated queries are best made explicit, or they can use the "df" request parameter
  266.  which takes precedence over this.
  267.  Note: Un-commenting defaultSearchField will be insufficient if your request handler
  268.  in solrconfig.xml defines "df", which takes precedence. That would need to be removed.
  269. <defaultSearchField>text</defaultSearchField> -->
  270.  
  271.  <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers
  272.  when parsing a query string to determine if a clause of the query should be marked as
  273.  required or optional, assuming the clause isn't already marked by some operator.
  274.  The default is OR, which is generally assumed so it is not a good idea to change it
  275.  globally here.  The "q.op" request parameter takes precedence over this.
  276. <solrQueryParser defaultOperator="OR"/> -->
  277.  
  278.   <!-- copyField commands copy one field to another at the time a document
  279.        is added to the index.  It's used either to index the same field differently,
  280.        or to add multiple fields to the same field for easier/faster searching.  -->
  281.  
  282.    <copyField source="cat" dest="text"/>
  283.    <copyField source="name" dest="text"/>
  284.    <copyField source="manu" dest="text"/>
  285.    <copyField source="features" dest="text"/>
  286.    <copyField source="includes" dest="text"/>
  287.    <copyField source="manu" dest="manu_exact"/>
  288.  
  289.    <!-- Copy the price into a currency enabled field (default USD) -->
  290.    <copyField source="price" dest="price_c"/>
  291.  
  292.    <!-- Text fields from SolrCell to search by default in our catch-all field -->
  293.    <copyField source="title" dest="text"/>
  294.    <copyField source="author" dest="text"/>
  295.    <copyField source="description" dest="text"/>
  296.    <copyField source="keywords" dest="text"/>
  297.    <copyField source="content" dest="text"/>
  298.    <copyField source="content_type" dest="text"/>
  299.    <copyField source="resourcename" dest="text"/>
  300.    <copyField source="url" dest="text"/>
  301.  
  302.    <!-- Create a string version of author for faceting -->
  303.    <copyField source="author" dest="author_s"/>
  304.        
  305.    <!-- Above, multiple source fields are copied to the [text] field.
  306.           Another way to map multiple source fields to the same
  307.           destination field is to use the dynamic field syntax.
  308.           copyField also supports a maxChars to copy setting.  -->
  309.            
  310.    <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
  311.  
  312.    <!-- copy name to alphaNameSort, a field designed for sorting by name -->
  313.    <!-- <copyField source="name" dest="alphaNameSort"/> -->
  314.  
  315.   <types>
  316.     <!-- field type definitions. The "name" attribute is
  317.       just a label to be used by field definitions.  The "class"
  318.       attribute and any other attributes determine the real
  319.       behavior of the fieldType.
  320.         Class names starting with "solr" refer to java classes in a
  321.       standard package such as org.apache.solr.analysis
  322.    -->
  323.  
  324.     <!-- The StrField type is not analyzed, but indexed/stored verbatim.
  325.       It supports doc values but in that case the field needs to be
  326.       single-valued and either required or have a default value.
  327.      -->
  328.     <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
  329.  
  330.     <!-- boolean type: "true" or "false" -->
  331.     <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
  332.  
  333.     <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
  334.         currently supported on types that are sorted internally as strings
  335.         and on numeric types.
  336.              This includes "string","boolean", and, as of 3.5 (and 4.x),
  337.              int, float, long, date, double, including the "Trie" variants.
  338.       - If sortMissingLast="true", then a sort on this field will cause documents
  339.         without the field to come after documents with the field,
  340.         regardless of the requested sort order (asc or desc).
  341.       - If sortMissingFirst="true", then a sort on this field will cause documents
  342.         without the field to come before documents with the field,
  343.         regardless of the requested sort order.
  344.       - If sortMissingLast="false" and sortMissingFirst="false" (the default),
  345.         then default lucene sorting will be used which places docs without the
  346.         field first in an ascending sort and last in a descending sort.
  347.    -->    
  348.  
  349.     <!--
  350.      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
  351.  
  352.      These fields support doc values, but they require the field to be
  353.      single-valued and either be required or have a default value.
  354.    -->
  355.     <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
  356.     <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
  357.     <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
  358.     <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
  359.  
  360.     <!--
  361.     Numeric field types that index each value at various levels of precision
  362.     to accelerate range queries when the number of values between the range
  363.     endpoints is large. See the javadoc for NumericRangeQuery for internal
  364.     implementation details.
  365.  
  366.     Smaller precisionStep values (specified in bits) will lead to more tokens
  367.     indexed per value, slightly larger index size, and faster range queries.
  368.     A precisionStep of 0 disables indexing at different precision levels.
  369.    -->
  370.     <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
  371.     <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
  372.     <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
  373.     <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
  374.  
  375.     <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  376.         is a more restricted form of the canonical representation of dateTime
  377.         http://www.w3.org/TR/xmlschema-2/#dateTime    
  378.         The trailing "Z" designates UTC time and is mandatory.
  379.         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  380.         All other components are mandatory.
  381.  
  382.         Expressions can also be used to denote calculations that should be
  383.         performed relative to "NOW" to determine the value, ie...
  384.  
  385.               NOW/HOUR
  386.                  ... Round to the start of the current hour
  387.               NOW-1DAY
  388.                  ... Exactly 1 day prior to now
  389.               NOW/DAY+6MONTHS+3DAYS
  390.                  ... 6 months and 3 days in the future from the start of
  391.                      the current day
  392.                      
  393.         Consult the DateField javadocs for more information.
  394.  
  395.         Note: For faster range queries, consider the tdate type
  396.      -->
  397.     <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
  398.  
  399.     <!-- A Trie based date field for faster date range queries and date faceting. -->
  400.     <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
  401.  
  402.  
  403.     <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
  404.     <fieldtype name="binary" class="solr.BinaryField"/>
  405.  
  406.     <!--
  407.      Note:
  408.      These should only be used for compatibility with existing indexes (created with lucene or older Solr versions).
  409.      Use Trie based fields instead. As of Solr 3.5 and 4.x, Trie based fields support sortMissingFirst/Last
  410.      
  411.      Plain numeric field types that store and index the text
  412.      value verbatim (and hence don't correctly support range queries, since the
  413.      lexicographic ordering isn't equal to the numeric ordering)
  414.    -->
  415.     <fieldType name="pint" class="solr.IntField"/>
  416.     <fieldType name="plong" class="solr.LongField"/>
  417.     <fieldType name="pfloat" class="solr.FloatField"/>
  418.     <fieldType name="pdouble" class="solr.DoubleField"/>
  419.     <fieldType name="pdate" class="solr.DateField" sortMissingLast="true"/>
  420.  
  421.     <!-- The "RandomSortField" is not used to store or search any
  422.         data.  You can declare fields of this type it in your schema
  423.         to generate pseudo-random orderings of your docs for sorting
  424.         or function purposes.  The ordering is generated based on the field
  425.         name and the version of the index. As long as the index version
  426.         remains unchanged, and the same field name is reused,
  427.         the ordering of the docs will be consistent.  
  428.         If you want different psuedo-random orderings of documents,
  429.         for the same version of the index, use a dynamicField and
  430.         change the field name in the request.
  431.     -->
  432.     <fieldType name="random" class="solr.RandomSortField" indexed="true" />
  433.  
  434.     <!-- solr.TextField allows the specification of custom text analyzers
  435.         specified as a tokenizer and a list of token filters. Different
  436.         analyzers may be specified for indexing and querying.
  437.  
  438.         The optional positionIncrementGap puts space between multiple fields of
  439.         this type on the same document, with the purpose of preventing false phrase
  440.         matching across fields.
  441.  
  442.         For more info on customizing your analyzer chain, please see
  443.         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  444.     -->
  445.  
  446.     <!-- One can also specify an existing Analyzer class that has a
  447.         default constructor via the class attribute on the analyzer element.
  448.         Example:
  449.    <fieldType name="text_greek" class="solr.TextField">
  450.      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
  451.    </fieldType>
  452.    -->
  453.  
  454.     <!-- A text field that only splits on whitespace for exact matching of words -->
  455.     <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
  456.       <analyzer>
  457.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  458.       </analyzer>
  459.     </fieldType>
  460.  
  461.     <!-- A general text field that has reasonable, generic
  462.         cross-language defaults: it tokenizes with StandardTokenizer,
  463.          removes stop words from case-insensitive "stopwords.txt"
  464.          (empty by default), and down cases.  At query time only, it
  465.          also applies synonyms. -->
  466.     <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
  467.       <analyzer type="index">
  468.         <tokenizer class="solr.StandardTokenizerFactory"/>
  469.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
  470.         <!-- in this example, we will only use synonyms at query time
  471.        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  472.        -->
  473.         <filter class="solr.LowerCaseFilterFactory"/>
  474.       </analyzer>
  475.       <analyzer type="query">
  476.         <tokenizer class="solr.StandardTokenizerFactory"/>
  477.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
  478.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  479.         <filter class="solr.LowerCaseFilterFactory"/>
  480.       </analyzer>
  481.     </fieldType>
  482.  
  483.     <!-- A text field with defaults appropriate for English: it
  484.         tokenizes with StandardTokenizer, removes English stop words
  485.         (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and
  486.         finally applies Porter's stemming.  The query time analyzer
  487.         also applies synonyms from synonyms.txt. -->
  488.     <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
  489.       <analyzer type="index">
  490.         <tokenizer class="solr.StandardTokenizerFactory"/>
  491.         <!-- in this example, we will only use synonyms at query time
  492.        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  493.        -->
  494.         <!-- Case insensitive stop word removal.
  495.        -->
  496.         <filter class="solr.StopFilterFactory"
  497.                ignoreCase="true"
  498.                words="lang/stopwords_en.txt"
  499.                />
  500.         <filter class="solr.LowerCaseFilterFactory"/>
  501.         <filter class="solr.EnglishPossessiveFilterFactory"/>
  502.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  503.         <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
  504.        <filter class="solr.EnglishMinimalStemFilterFactory"/>
  505.         -->
  506.         <filter class="solr.PorterStemFilterFactory"/>
  507.       </analyzer>
  508.       <analyzer type="query">
  509.         <tokenizer class="solr.StandardTokenizerFactory"/>
  510.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  511.         <filter class="solr.StopFilterFactory"
  512.                ignoreCase="true"
  513.                words="lang/stopwords_en.txt"
  514.                />
  515.         <filter class="solr.LowerCaseFilterFactory"/>
  516.         <filter class="solr.EnglishPossessiveFilterFactory"/>
  517.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  518.         <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
  519.        <filter class="solr.EnglishMinimalStemFilterFactory"/>
  520.         -->
  521.         <filter class="solr.PorterStemFilterFactory"/>
  522.       </analyzer>
  523.     </fieldType>
  524.  
  525.     <!-- A text field with defaults appropriate for English, plus
  526.          aggressive word-splitting and autophrase features enabled.
  527.          This field is just like text_en, except it adds
  528.          WordDelimiterFilter to enable splitting and matching of
  529.          words on case-change, alpha numeric boundaries, and
  530.          non-alphanumeric chars.  This means certain compound word
  531.          cases will work, for example query "wi fi" will match
  532.          document "WiFi" or "wi-fi".
  533.        -->
  534.     <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  535.       <analyzer type="index">
  536.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  537.         <!-- in this example, we will only use synonyms at query time
  538.        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  539.        -->
  540.         <!-- Case insensitive stop word removal.
  541.        -->
  542.         <filter class="solr.StopFilterFactory"
  543.                ignoreCase="true"
  544.                words="lang/stopwords_en.txt"
  545.                />
  546.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
  547.         <filter class="solr.LowerCaseFilterFactory"/>
  548.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  549.         <filter class="solr.PorterStemFilterFactory"/>
  550.       </analyzer>
  551.       <analyzer type="query">
  552.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  553.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  554.         <filter class="solr.StopFilterFactory"
  555.                ignoreCase="true"
  556.                words="lang/stopwords_en.txt"
  557.                />
  558.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
  559.         <filter class="solr.LowerCaseFilterFactory"/>
  560.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  561.         <filter class="solr.PorterStemFilterFactory"/>
  562.       </analyzer>
  563.     </fieldType>
  564.  
  565.     <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
  566.         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
  567.     <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  568.       <analyzer>
  569.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  570.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
  571.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"/>
  572.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
  573.         <filter class="solr.LowerCaseFilterFactory"/>
  574.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  575.         <filter class="solr.EnglishMinimalStemFilterFactory"/>
  576.         <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
  577.             possible with WordDelimiterFilter in conjuncton with stemming. -->
  578.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  579.       </analyzer>
  580.     </fieldType>
  581.  
  582.     <!-- Just like text_general except it reverses the characters of
  583.          each token, to enable more efficient leading wildcard queries. -->
  584.     <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
  585.       <analyzer type="index">
  586.         <tokenizer class="solr.StandardTokenizerFactory"/>
  587.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
  588.         <filter class="solr.LowerCaseFilterFactory"/>
  589.         <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
  590.           maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
  591.       </analyzer>
  592.       <analyzer type="query">
  593.         <tokenizer class="solr.StandardTokenizerFactory"/>
  594.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  595.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
  596.         <filter class="solr.LowerCaseFilterFactory"/>
  597.       </analyzer>
  598.     </fieldType>
  599.  
  600.     <!-- charFilter + WhitespaceTokenizer  -->
  601.     <!--
  602.    <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
  603.      <analyzer>
  604.        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
  605.        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  606.      </analyzer>
  607.    </fieldType>
  608.    -->
  609.  
  610.     <!-- This is an example of using the KeywordTokenizer along
  611.         With various TokenFilterFactories to produce a sortable field
  612.         that does not include some properties of the source text
  613.      -->
  614.     <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
  615.       <analyzer>
  616.         <!-- KeywordTokenizer does no actual tokenizing, so the entire
  617.             input string is preserved as a single token
  618.          -->
  619.         <tokenizer class="solr.KeywordTokenizerFactory"/>
  620.         <!-- The LowerCase TokenFilter does what you expect, which can be
  621.             when you want your sorting to be case insensitive
  622.          -->
  623.         <filter class="solr.LowerCaseFilterFactory" />
  624.         <!-- The TrimFilter removes any leading or trailing whitespace -->
  625.         <filter class="solr.TrimFilterFactory" />
  626.         <!-- The PatternReplaceFilter gives you the flexibility to use
  627.             Java Regular expression to replace any sequence of characters
  628.             matching a pattern with an arbitrary replacement string,
  629.             which may include back references to portions of the original
  630.             string matched by the pattern.
  631.            
  632.             See the Java Regular Expression documentation for more
  633.             information on pattern and replacement string syntax.
  634.            
  635.             http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html
  636.          -->
  637.         <filter class="solr.PatternReplaceFilterFactory"
  638.                pattern="([^a-z])" replacement="" replace="all"
  639.        />
  640.       </analyzer>
  641.     </fieldType>
  642.    
  643.     <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
  644.       <analyzer>
  645.         <tokenizer class="solr.StandardTokenizerFactory"/>
  646.         <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
  647.       </analyzer>
  648.     </fieldtype>
  649.  
  650.     <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
  651.       <analyzer>
  652.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  653.         <!--
  654.        The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  655.        a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
  656.        Attributes of the DelimitedPayloadTokenFilterFactory :
  657.         "delimiter" - a one character delimiter. Default is | (pipe)
  658.          "encoder" - how to encode the following value into a playload
  659.             float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  660.             integer -> o.a.l.a.p.IntegerEncoder
  661.             identity -> o.a.l.a.p.IdentityEncoder
  662.            Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
  663.         -->
  664.         <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
  665.       </analyzer>
  666.     </fieldtype>
  667.  
  668.     <!-- lowercases the entire field value, keeping it as a single token.  -->
  669.     <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
  670.       <analyzer>
  671.         <tokenizer class="solr.KeywordTokenizerFactory"/>
  672.         <filter class="solr.LowerCaseFilterFactory" />
  673.       </analyzer>
  674.     </fieldType>
  675.  
  676.     <!--
  677.      Example of using PathHierarchyTokenizerFactory at index time, so
  678.      queries for paths match documents at that path, or in descendent paths
  679.    -->
  680.     <fieldType name="descendent_path" class="solr.TextField">
  681.       <analyzer type="index">
  682.         <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
  683.       </analyzer>
  684.       <analyzer type="query">
  685.         <tokenizer class="solr.KeywordTokenizerFactory" />
  686.       </analyzer>
  687.     </fieldType>
  688.     <!--
  689.      Example of using PathHierarchyTokenizerFactory at query time, so
  690.      queries for paths match documents at that path, or in ancestor paths
  691.    -->
  692.     <fieldType name="ancestor_path" class="solr.TextField">
  693.       <analyzer type="index">
  694.         <tokenizer class="solr.KeywordTokenizerFactory" />
  695.       </analyzer>
  696.       <analyzer type="query">
  697.         <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
  698.       </analyzer>
  699.     </fieldType>
  700.  
  701.     <!-- since fields of this type are by default not stored or indexed,
  702.         any data added to them will be ignored outright.  -->
  703.     <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
  704.  
  705.     <!-- This point type indexes the coordinates as separate fields (subFields)
  706.      If subFieldType is defined, it references a type, and a dynamic field
  707.      definition is created matching *___<typename>.  Alternately, if
  708.      subFieldSuffix is defined, that is used to create the subFields.
  709.      Example: if subFieldType="double", then the coordinates would be
  710.        indexed in fields myloc_0___double,myloc_1___double.
  711.      Example: if subFieldSuffix="_d" then the coordinates would be indexed
  712.        in fields myloc_0_d,myloc_1_d
  713.      The subFields are an implementation detail of the fieldType, and end
  714.      users normally should not need to know about them.
  715.     -->
  716.     <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
  717.  
  718.     <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
  719.     <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
  720.  
  721.     <!-- An alternative geospatial field type new to Solr 4.  It supports multiValued and polygon shapes.
  722.      For more information about this and other Spatial fields new to Solr 4, see:
  723.      http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
  724.    -->
  725.     <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
  726.        geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
  727.  
  728.    <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
  729.        Parameters:
  730.          defaultCurrency: Specifies the default currency if none specified. Defaults to "USD"
  731.          precisionStep:   Specifies the precisionStep for the TrieLong field used for the amount
  732.          providerClass:   Lets you plug in other exchange provider backend:
  733.                           solr.FileExchangeRateProvider is the default and takes one parameter:
  734.                             currencyConfig: name of an xml file holding exchange rates
  735.                           solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
  736.                             ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)
  737.                             refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)
  738.   -->
  739.     <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" />
  740.              
  741.  
  742.  
  743.    <!-- some examples for different languages (generally ordered by ISO code) -->
  744.  
  745.     <!-- Arabic -->
  746.     <fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100">
  747.       <analyzer>
  748.         <tokenizer class="solr.StandardTokenizerFactory"/>
  749.         <!-- for any non-arabic -->
  750.         <filter class="solr.LowerCaseFilterFactory"/>
  751.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" />
  752.         <!-- normalizes ﻯ to ﻱ, etc -->
  753.         <filter class="solr.ArabicNormalizationFilterFactory"/>
  754.         <filter class="solr.ArabicStemFilterFactory"/>
  755.       </analyzer>
  756.     </fieldType>
  757.  
  758.     <!-- Bulgarian -->
  759.     <fieldType name="text_bg" class="solr.TextField" positionIncrementGap="100">
  760.       <analyzer>
  761.         <tokenizer class="solr.StandardTokenizerFactory"/>
  762.         <filter class="solr.LowerCaseFilterFactory"/>
  763.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_bg.txt" />
  764.         <filter class="solr.BulgarianStemFilterFactory"/>      
  765.       </analyzer>
  766.     </fieldType>
  767.    
  768.     <!-- Catalan -->
  769.     <fieldType name="text_ca" class="solr.TextField" positionIncrementGap="100">
  770.       <analyzer>
  771.         <tokenizer class="solr.StandardTokenizerFactory"/>
  772.         <!-- removes l', etc -->
  773.         <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ca.txt"/>
  774.         <filter class="solr.LowerCaseFilterFactory"/>
  775.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ca.txt" />
  776.         <filter class="solr.SnowballPorterFilterFactory" language="Catalan"/>      
  777.       </analyzer>
  778.     </fieldType>
  779.    
  780.     <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) -->
  781.     <fieldType name="text_cjk" class="solr.TextField" positionIncrementGap="100">
  782.       <analyzer>
  783.         <tokenizer class="solr.StandardTokenizerFactory"/>
  784.         <!-- normalize width before bigram, as e.g. half-width dakuten combine  -->
  785.         <filter class="solr.CJKWidthFilterFactory"/>
  786.         <!-- for any non-CJK -->
  787.         <filter class="solr.LowerCaseFilterFactory"/>
  788.         <filter class="solr.CJKBigramFilterFactory"/>
  789.       </analyzer>
  790.     </fieldType>
  791.  
  792.     <!-- Czech -->
  793.     <fieldType name="text_cz" class="solr.TextField" positionIncrementGap="100">
  794.       <analyzer>
  795.         <tokenizer class="solr.StandardTokenizerFactory"/>
  796.         <filter class="solr.LowerCaseFilterFactory"/>
  797.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_cz.txt" />
  798.         <filter class="solr.CzechStemFilterFactory"/>      
  799.       </analyzer>
  800.     </fieldType>
  801.    
  802.     <!-- Danish -->
  803.     <fieldType name="text_da" class="solr.TextField" positionIncrementGap="100">
  804.       <analyzer>
  805.         <tokenizer class="solr.StandardTokenizerFactory"/>
  806.         <filter class="solr.LowerCaseFilterFactory"/>
  807.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_da.txt" format="snowball" />
  808.         <filter class="solr.SnowballPorterFilterFactory" language="Danish"/>      
  809.       </analyzer>
  810.     </fieldType>
  811.    
  812.     <!-- German -->
  813.     <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
  814.       <analyzer>
  815.         <tokenizer class="solr.StandardTokenizerFactory"/>
  816.         <filter class="solr.LowerCaseFilterFactory"/>
  817.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" />
  818.         <filter class="solr.GermanNormalizationFilterFactory"/>
  819.         <filter class="solr.GermanLightStemFilterFactory"/>
  820.         <!-- less aggressive: <filter class="solr.GermanMinimalStemFilterFactory"/> -->
  821.         <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="German2"/> -->
  822.       </analyzer>
  823.     </fieldType>
  824.    
  825.     <!-- Greek -->
  826.     <fieldType name="text_el" class="solr.TextField" positionIncrementGap="100">
  827.       <analyzer>
  828.         <tokenizer class="solr.StandardTokenizerFactory"/>
  829.         <!-- greek specific lowercase for sigma -->
  830.         <filter class="solr.GreekLowerCaseFilterFactory"/>
  831.         <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_el.txt" />
  832.         <filter class="solr.GreekStemFilterFactory"/>
  833.       </analyzer>
  834.     </fieldType>
  835.    
  836.     <!-- Spanish -->
  837.     <fieldType name="text_es" class="solr.TextField" positionIncrementGap="100">
  838.       <analyzer>
  839.         <tokenizer class="solr.StandardTokenizerFactory"/>
  840.         <filter class="solr.LowerCaseFilterFactory"/>
  841.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_es.txt" format="snowball" />
  842.         <filter class="solr.SpanishLightStemFilterFactory"/>
  843.         <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Spanish"/> -->
  844.       </analyzer>
  845.     </fieldType>
  846.    
  847.     <!-- Basque -->
  848.     <fieldType name="text_eu" class="solr.TextField" positionIncrementGap="100">
  849.       <analyzer>
  850.         <tokenizer class="solr.StandardTokenizerFactory"/>
  851.         <filter class="solr.LowerCaseFilterFactory"/>
  852.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_eu.txt" />
  853.         <filter class="solr.SnowballPorterFilterFactory" language="Basque"/>
  854.       </analyzer>
  855.     </fieldType>
  856.    
  857.     <!-- Persian -->
  858.     <fieldType name="text_fa" class="solr.TextField" positionIncrementGap="100">
  859.       <analyzer>
  860.         <!-- for ZWNJ -->
  861.         <charFilter class="solr.PersianCharFilterFactory"/>
  862.         <tokenizer class="solr.StandardTokenizerFactory"/>
  863.         <filter class="solr.LowerCaseFilterFactory"/>
  864.         <filter class="solr.ArabicNormalizationFilterFactory"/>
  865.         <filter class="solr.PersianNormalizationFilterFactory"/>
  866.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fa.txt" />
  867.       </analyzer>
  868.     </fieldType>
  869.    
  870.     <!-- Finnish -->
  871.     <fieldType name="text_fi" class="solr.TextField" positionIncrementGap="100">
  872.       <analyzer>
  873.         <tokenizer class="solr.StandardTokenizerFactory"/>
  874.         <filter class="solr.LowerCaseFilterFactory"/>
  875.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fi.txt" format="snowball" />
  876.         <filter class="solr.SnowballPorterFilterFactory" language="Finnish"/>
  877.         <!-- less aggressive: <filter class="solr.FinnishLightStemFilterFactory"/> -->
  878.       </analyzer>
  879.     </fieldType>
  880.    
  881.     <!-- French -->
  882.     <fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100">
  883.       <analyzer>
  884.         <tokenizer class="solr.StandardTokenizerFactory"/>
  885.         <!-- removes l', etc -->
  886.         <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/>
  887.         <filter class="solr.LowerCaseFilterFactory"/>
  888.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fr.txt" format="snowball" />
  889.         <filter class="solr.FrenchLightStemFilterFactory"/>
  890.         <!-- less aggressive: <filter class="solr.FrenchMinimalStemFilterFactory"/> -->
  891.         <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="French"/> -->
  892.       </analyzer>
  893.     </fieldType>
  894.    
  895.     <!-- Irish -->
  896.     <fieldType name="text_ga" class="solr.TextField" positionIncrementGap="100">
  897.       <analyzer>
  898.         <tokenizer class="solr.StandardTokenizerFactory"/>
  899.         <!-- removes d', etc -->
  900.         <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ga.txt"/>
  901.         <!-- removes n-, etc. position increments is intentionally false! -->
  902.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/hyphenations_ga.txt"/>
  903.         <filter class="solr.IrishLowerCaseFilterFactory"/>
  904.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ga.txt"/>
  905.         <filter class="solr.SnowballPorterFilterFactory" language="Irish"/>
  906.       </analyzer>
  907.     </fieldType>
  908.    
  909.     <!-- Galician -->
  910.     <fieldType name="text_gl" class="solr.TextField" positionIncrementGap="100">
  911.       <analyzer>
  912.         <tokenizer class="solr.StandardTokenizerFactory"/>
  913.         <filter class="solr.LowerCaseFilterFactory"/>
  914.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_gl.txt" />
  915.         <filter class="solr.GalicianStemFilterFactory"/>
  916.         <!-- less aggressive: <filter class="solr.GalicianMinimalStemFilterFactory"/> -->
  917.       </analyzer>
  918.     </fieldType>
  919.    
  920.     <!-- Hindi -->
  921.     <fieldType name="text_hi" class="solr.TextField" positionIncrementGap="100">
  922.       <analyzer>
  923.         <tokenizer class="solr.StandardTokenizerFactory"/>
  924.         <filter class="solr.LowerCaseFilterFactory"/>
  925.         <!-- normalizes unicode representation -->
  926.         <filter class="solr.IndicNormalizationFilterFactory"/>
  927.         <!-- normalizes variation in spelling -->
  928.         <filter class="solr.HindiNormalizationFilterFactory"/>
  929.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hi.txt" />
  930.         <filter class="solr.HindiStemFilterFactory"/>
  931.       </analyzer>
  932.     </fieldType>
  933.    
  934.     <!-- Hungarian -->
  935.     <fieldType name="text_hu" class="solr.TextField" positionIncrementGap="100">
  936.       <analyzer>
  937.         <tokenizer class="solr.StandardTokenizerFactory"/>
  938.         <filter class="solr.LowerCaseFilterFactory"/>
  939.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hu.txt" format="snowball" />
  940.         <filter class="solr.SnowballPorterFilterFactory" language="Hungarian"/>
  941.         <!-- less aggressive: <filter class="solr.HungarianLightStemFilterFactory"/> -->  
  942.       </analyzer>
  943.     </fieldType>
  944.    
  945.     <!-- Armenian -->
  946.     <fieldType name="text_hy" class="solr.TextField" positionIncrementGap="100">
  947.       <analyzer>
  948.         <tokenizer class="solr.StandardTokenizerFactory"/>
  949.         <filter class="solr.LowerCaseFilterFactory"/>
  950.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hy.txt" />
  951.         <filter class="solr.SnowballPorterFilterFactory" language="Armenian"/>
  952.       </analyzer>
  953.     </fieldType>
  954.    
  955.     <!-- Indonesian -->
  956.     <fieldType name="text_id" class="solr.TextField" positionIncrementGap="100">
  957.       <analyzer>
  958.         <tokenizer class="solr.StandardTokenizerFactory"/>
  959.         <filter class="solr.LowerCaseFilterFactory"/>
  960.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_id.txt" />
  961.         <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false -->
  962.         <filter class="solr.IndonesianStemFilterFactory" stemDerivational="true"/>
  963.       </analyzer>
  964.     </fieldType>
  965.    
  966.     <!-- Italian -->
  967.     <fieldType name="text_it" class="solr.TextField" positionIncrementGap="100">
  968.       <analyzer>
  969.         <tokenizer class="solr.StandardTokenizerFactory"/>
  970.         <!-- removes l', etc -->
  971.         <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_it.txt"/>
  972.         <filter class="solr.LowerCaseFilterFactory"/>
  973.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_it.txt" format="snowball" />
  974.         <filter class="solr.ItalianLightStemFilterFactory"/>
  975.         <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Italian"/> -->
  976.       </analyzer>
  977.     </fieldType>
  978.    
  979.     <!-- Japanese using morphological analysis (see text_cjk for a configuration using bigramming)
  980.  
  981.         NOTE: If you want to optimize search for precision, use default operator AND in your query
  982.         parser config with <solrQueryParser defaultOperator="AND"/> further down in this file.  Use
  983.         OR if you would like to optimize for recall (default).
  984.    -->
  985.     <fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false">
  986.       <analyzer>
  987.       <!-- Kuromoji Japanese morphological analyzer/tokenizer (JapaneseTokenizer)
  988.  
  989.           Kuromoji has a search mode (default) that does segmentation useful for search.  A heuristic
  990.           is used to segment compounds into its parts and the compound itself is kept as synonym.
  991.  
  992.           Valid values for attribute mode are:
  993.              normal: regular segmentation
  994.              search: segmentation useful for search with synonyms compounds (default)
  995.            extended: same as search mode, but unigrams unknown words (experimental)
  996.  
  997.           For some applications it might be good to use search mode for indexing and normal mode for
  998.           queries to reduce recall and prevent parts of compounds from being matched and highlighted.
  999.           Use <analyzer type="index"> and <analyzer type="query"> for this and mode normal in query.
  1000.  
  1001.           Kuromoji also has a convenient user dictionary feature that allows overriding the statistical
  1002.           model with your own entries for segmentation, part-of-speech tags and readings without a need
  1003.           to specify weights.  Notice that user dictionaries have not been subject to extensive testing.
  1004.  
  1005.           User dictionary attributes are:
  1006.                     userDictionary: user dictionary filename
  1007.             userDictionaryEncoding: user dictionary encoding (default is UTF-8)
  1008.  
  1009.           See lang/userdict_ja.txt for a sample user dictionary file.
  1010.  
  1011.           Punctuation characters are discarded by default.  Use discardPunctuation="false" to keep them.
  1012.  
  1013.           See http://wiki.apache.org/solr/JapaneseLanguageSupport for more on Japanese language support.
  1014.        -->
  1015.         <tokenizer class="solr.JapaneseTokenizerFactory" mode="search"/>
  1016.         <!--<tokenizer class="solr.JapaneseTokenizerFactory" mode="search" userDictionary="lang/userdict_ja.txt"/>-->
  1017.         <!-- Reduces inflected verbs and adjectives to their base/dictionary forms (辞書形) -->
  1018.         <filter class="solr.JapaneseBaseFormFilterFactory"/>
  1019.         <!-- Removes tokens with certain part-of-speech tags -->
  1020.         <filter class="solr.JapanesePartOfSpeechStopFilterFactory" tags="lang/stoptags_ja.txt" />
  1021.         <!-- Normalizes full-width romaji to half-width and half-width kana to full-width (Unicode NFKC subset) -->
  1022.         <filter class="solr.CJKWidthFilterFactory"/>
  1023.         <!-- Removes common tokens typically not useful for search, but have a negative effect on ranking -->
  1024.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ja.txt" />
  1025.         <!-- Normalizes common katakana spelling variations by removing any last long sound character (U+30FC) -->
  1026.         <filter class="solr.JapaneseKatakanaStemFilterFactory" minimumLength="4"/>
  1027.         <!-- Lower-cases romaji characters -->
  1028.         <filter class="solr.LowerCaseFilterFactory"/>
  1029.       </analyzer>
  1030.     </fieldType>
  1031.    
  1032.     <!-- Latvian -->
  1033.     <fieldType name="text_lv" class="solr.TextField" positionIncrementGap="100">
  1034.       <analyzer>
  1035.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1036.         <filter class="solr.LowerCaseFilterFactory"/>
  1037.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_lv.txt" />
  1038.         <filter class="solr.LatvianStemFilterFactory"/>
  1039.       </analyzer>
  1040.     </fieldType>
  1041.    
  1042.     <!-- Dutch -->
  1043.     <fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100">
  1044.       <analyzer>
  1045.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1046.         <filter class="solr.LowerCaseFilterFactory"/>
  1047.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_nl.txt" format="snowball" />
  1048.         <filter class="solr.StemmerOverrideFilterFactory" dictionary="lang/stemdict_nl.txt" ignoreCase="false"/>
  1049.         <filter class="solr.SnowballPorterFilterFactory" language="Dutch"/>
  1050.       </analyzer>
  1051.     </fieldType>
  1052.    
  1053.     <!-- Norwegian -->
  1054.     <fieldType name="text_no" class="solr.TextField" positionIncrementGap="100">
  1055.       <analyzer>
  1056.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1057.         <filter class="solr.LowerCaseFilterFactory"/>
  1058.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" />
  1059.         <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/>
  1060.         <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory" variant="nb"/> -->
  1061.         <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory" variant="nb"/> -->
  1062.         <!-- The "light" and "minimal" stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both -->
  1063.       </analyzer>
  1064.     </fieldType>
  1065.    
  1066.     <!-- Portuguese -->
  1067.     <fieldType name="text_pt" class="solr.TextField" positionIncrementGap="100">
  1068.       <analyzer>
  1069.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1070.         <filter class="solr.LowerCaseFilterFactory"/>
  1071.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pt.txt" format="snowball" />
  1072.         <filter class="solr.PortugueseLightStemFilterFactory"/>
  1073.         <!-- less aggressive: <filter class="solr.PortugueseMinimalStemFilterFactory"/> -->
  1074.         <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Portuguese"/> -->
  1075.         <!-- most aggressive: <filter class="solr.PortugueseStemFilterFactory"/> -->
  1076.       </analyzer>
  1077.     </fieldType>
  1078.    
  1079.     <!-- Romanian -->
  1080.     <fieldType name="text_ro" class="solr.TextField" positionIncrementGap="100">
  1081.       <analyzer>
  1082.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1083.         <filter class="solr.LowerCaseFilterFactory"/>
  1084.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ro.txt" />
  1085.         <filter class="solr.SnowballPorterFilterFactory" language="Romanian"/>
  1086.       </analyzer>
  1087.     </fieldType>
  1088.    
  1089.     <!-- Russian -->
  1090.     <fieldType name="text_ru" class="solr.TextField" positionIncrementGap="100">
  1091.       <analyzer>
  1092.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1093.         <filter class="solr.LowerCaseFilterFactory"/>
  1094.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" />
  1095.         <filter class="solr.SnowballPorterFilterFactory" language="Russian"/>
  1096.         <!-- less aggressive: <filter class="solr.RussianLightStemFilterFactory"/> -->
  1097.       </analyzer>
  1098.     </fieldType>
  1099.    
  1100.     <!-- Swedish -->
  1101.     <fieldType name="text_sv" class="solr.TextField" positionIncrementGap="100">
  1102.       <analyzer>
  1103.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1104.         <filter class="solr.LowerCaseFilterFactory"/>
  1105.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_sv.txt" format="snowball" />
  1106.         <filter class="solr.SnowballPorterFilterFactory" language="Swedish"/>
  1107.         <!-- less aggressive: <filter class="solr.SwedishLightStemFilterFactory"/> -->
  1108.       </analyzer>
  1109.     </fieldType>
  1110.    
  1111.     <!-- Thai -->
  1112.     <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">
  1113.       <analyzer>
  1114.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1115.         <filter class="solr.LowerCaseFilterFactory"/>
  1116.         <filter class="solr.ThaiWordFilterFactory"/>
  1117.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" />
  1118.       </analyzer>
  1119.     </fieldType>
  1120.    
  1121.     <!-- Turkish -->
  1122.     <fieldType name="text_tr" class="solr.TextField" positionIncrementGap="100">
  1123.       <analyzer>
  1124.         <tokenizer class="solr.StandardTokenizerFactory"/>
  1125.         <filter class="solr.TurkishLowerCaseFilterFactory"/>
  1126.         <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_tr.txt" />
  1127.         <filter class="solr.SnowballPorterFilterFactory" language="Turkish"/>
  1128.       </analyzer>
  1129.     </fieldType>
  1130.  
  1131.  </types>
  1132.  
  1133.   <!-- Similarity is the scoring routine for each document vs. a query.
  1134.       A custom Similarity or SimilarityFactory may be specified here, but
  1135.       the default is fine for most applications.  
  1136.       For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
  1137.    -->
  1138.   <!--
  1139.     <similarity class="com.example.solr.CustomSimilarityFactory">
  1140.       <str name="paramkey">param value</str>
  1141.     </similarity>
  1142.    -->
  1143.  
  1144. </schema>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top