Guest User

Untitled

a guest
Apr 29th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 14.13 KB | None | 0 0
  1. <schema name="sunspot" version="1.5">
  2.   <types>
  3.     <!-- field type definitions. The "name" attribute is
  4.       just a label to be used by field definitions.  The "class"
  5.       attribute and any other attributes determine the real
  6.       behavior of the fieldType.
  7.         Class names starting with "solr" refer to java classes in the
  8.       org.apache.solr.analysis package.
  9.    -->
  10.     <!-- *** This fieldType is used by Sunspot! *** -->
  11.     <fieldType name="string" class="solr.StrField" omitNorms="true"/>
  12.     <!-- *** This fieldType is used by Sunspot! *** -->
  13.     <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true"/>
  14.     <!-- *** This fieldType is used by Sunspot! *** -->
  15.     <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
  16.     <!-- *** This fieldType is used by Sunspot! *** -->
  17.  
  18.     <fieldType name="text" class="solr.TextField" omitNorms="false">
  19.       <analyzer>
  20.         <tokenizer class="solr.StandardTokenizerFactory" />
  21.         <filter class="solr.StandardFilterFactory"/>
  22.         <filter class="solr.LowerCaseFilterFactory"/>
  23.         <filter class="solr.SnowballPorterFilterFactory" language="English" />
  24.         <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="15"/>
  25.       </analyzer>
  26.     </fieldType>
  27.  
  28.     <!-- *** This fieldType is used by Sunspot! *** -->
  29.     <fieldType name="boolean" class="solr.BoolField" omitNorms="true"/>
  30.     <!-- *** This fieldType is used by Sunspot! *** -->
  31.     <fieldType name="date" class="solr.DateField" omitNorms="true"/>
  32.     <!-- *** This fieldType is used by Sunspot! *** -->
  33.     <fieldType name="sdouble" class="solr.SortableDoubleField" omitNorms="true"/>
  34.     <!-- *** This fieldType is used by Sunspot! *** -->
  35.     <fieldType name="sfloat" class="solr.SortableFloatField" omitNorms="true"/>
  36.     <!-- *** This fieldType is used by Sunspot! *** -->
  37.     <fieldType name="sint" class="solr.SortableIntField" omitNorms="true"/>
  38.     <!-- *** This fieldType is used by Sunspot! *** -->
  39.     <fieldType name="slong" class="solr.SortableLongField" omitNorms="true"/>
  40.     <!-- *** This fieldType is used by Sunspot! *** -->
  41.     <fieldType name="tint" class="solr.TrieIntField" omitNorms="true"/>
  42.     <!-- *** This fieldType is used by Sunspot! *** -->
  43.     <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
  44.     <!-- *** This fieldType is used by Sunspot! *** -->
  45.     <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"/>
  46.  
  47.     <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
  48.     <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
  49.   </types>
  50.   <fields>
  51.     <!-- Valid attributes for fields:
  52.     name: mandatory - the name for the field
  53.     type: mandatory - the name of a previously defined type from the
  54.       <types> section
  55.     indexed: true if this field should be indexed (searchable or sortable)
  56.     stored: true if this field should be retrievable
  57.     compressed: [false] if this field should be stored using gzip compression
  58.       (this will only apply if the field type is compressable; among
  59.       the standard field types, only TextField and StrField are)
  60.     multiValued: true if this field may contain multiple values per document
  61.     omitNorms: (expert) set to true to omit the norms associated with
  62.       this field (this disables length normalization and index-time
  63.       boosting for the field, and saves some memory).  Only full-text
  64.       fields or fields that need an index-time boost need norms.
  65.     termVectors: [false] set to true to store the term vector for a
  66.       given field.
  67.       When using MoreLikeThis, fields used for similarity should be
  68.       stored for best performance.
  69.     termPositions: Store position information with the term vector.  
  70.       This will increase storage costs.
  71.     termOffsets: Store offset information with the term vector. This
  72.       will increase storage costs.
  73.     default: a value that should be used if no value is specified
  74.       when adding a document.
  75.   -->
  76.     <!-- *** This field is used by Sunspot! *** -->
  77.     <field name="id" stored="true" type="string" multiValued="false" indexed="true"/>
  78.     <!-- *** This field is used by Sunspot! *** -->
  79.     <field name="type" stored="false" type="string" multiValued="true" indexed="true"/>
  80.     <!-- *** This field is used by Sunspot! *** -->
  81.     <field name="class_name" stored="false" type="string" multiValued="false" indexed="true"/>
  82.     <!-- *** This field is used by Sunspot! *** -->
  83.     <field name="text" stored="false" type="string" multiValued="true" indexed="true"/>
  84.     <!-- *** This field is used by Sunspot! *** -->
  85.     <field name="lat" stored="true" type="tdouble" multiValued="false" indexed="true"/>
  86.     <!-- *** This field is used by Sunspot! *** -->
  87.     <field name="lng" stored="true" type="tdouble" multiValued="false" indexed="true"/>
  88.     <!-- *** This dynamicField is used by Sunspot! *** -->
  89.     <dynamicField name="random_*" stored="false" type="rand" multiValued="false" indexed="true"/>
  90.     <!-- *** This dynamicField is used by Sunspot! *** -->
  91.     <dynamicField name="_local*" stored="false" type="tdouble" multiValued="false" indexed="true"/>
  92.     <!-- *** This dynamicField is used by Sunspot! *** -->
  93.     <dynamicField name="*_text" stored="false" type="text" multiValued="true" indexed="true"/>
  94.     <!-- *** This dynamicField is used by Sunspot! *** -->
  95.     <dynamicField name="*_texts" stored="true" type="text" multiValued="true" indexed="true"/>
  96.     <!-- *** This dynamicField is used by Sunspot! *** -->
  97.     <dynamicField name="*_b" stored="false" type="boolean" multiValued="false" indexed="true"/>
  98.     <!-- *** This dynamicField is used by Sunspot! *** -->
  99.     <dynamicField name="*_bm" stored="false" type="boolean" multiValued="true" indexed="true"/>
  100.     <!-- *** This dynamicField is used by Sunspot! *** -->
  101.     <dynamicField name="*_bs" stored="true" type="boolean" multiValued="false" indexed="true"/>
  102.     <!-- *** This dynamicField is used by Sunspot! *** -->
  103.     <dynamicField name="*_bms" stored="true" type="boolean" multiValued="true" indexed="true"/>
  104.     <!-- *** This dynamicField is used by Sunspot! *** -->
  105.     <dynamicField name="*_d" stored="false" type="date" multiValued="false" indexed="true"/>
  106.     <!-- *** This dynamicField is used by Sunspot! *** -->
  107.     <dynamicField name="*_dm" stored="false" type="date" multiValued="true" indexed="true"/>
  108.     <!-- *** This dynamicField is used by Sunspot! *** -->
  109.     <dynamicField name="*_ds" stored="true" type="date" multiValued="false" indexed="true"/>
  110.     <!-- *** This dynamicField is used by Sunspot! *** -->
  111.     <dynamicField name="*_dms" stored="true" type="date" multiValued="true" indexed="true"/>
  112.     <!-- *** This dynamicField is used by Sunspot! *** -->
  113.     <dynamicField name="*_e" stored="false" type="sdouble" multiValued="false" indexed="true"/>
  114.     <!-- *** This dynamicField is used by Sunspot! *** -->
  115.     <dynamicField name="*_em" stored="false" type="sdouble" multiValued="true" indexed="true"/>
  116.     <!-- *** This dynamicField is used by Sunspot! *** -->
  117.     <dynamicField name="*_es" stored="true" type="sdouble" multiValued="false" indexed="true"/>
  118.     <!-- *** This dynamicField is used by Sunspot! *** -->
  119.     <dynamicField name="*_ems" stored="true" type="sdouble" multiValued="true" indexed="true"/>
  120.     <!-- *** This dynamicField is used by Sunspot! *** -->
  121.     <dynamicField name="*_f" stored="false" type="sfloat" multiValued="false" indexed="true"/>
  122.     <!-- *** This dynamicField is used by Sunspot! *** -->
  123.     <dynamicField name="*_fm" stored="false" type="sfloat" multiValued="true" indexed="true"/>
  124.     <!-- *** This dynamicField is used by Sunspot! *** -->
  125.     <dynamicField name="*_fs" stored="true" type="sfloat" multiValued="false" indexed="true"/>
  126.     <!-- *** This dynamicField is used by Sunspot! *** -->
  127.     <dynamicField name="*_fms" stored="true" type="sfloat" multiValued="true" indexed="true"/>
  128.     <!-- *** This dynamicField is used by Sunspot! *** -->
  129.     <dynamicField name="*_i" stored="false" type="sint" multiValued="false" indexed="true"/>
  130.     <!-- *** This dynamicField is used by Sunspot! *** -->
  131.     <dynamicField name="*_im" stored="false" type="sint" multiValued="true" indexed="true"/>
  132.     <!-- *** This dynamicField is used by Sunspot! *** -->
  133.     <dynamicField name="*_is" stored="true" type="sint" multiValued="false" indexed="true"/>
  134.     <!-- *** This dynamicField is used by Sunspot! *** -->
  135.     <dynamicField name="*_ims" stored="true" type="sint" multiValued="true" indexed="true"/>
  136.     <!-- *** This dynamicField is used by Sunspot! *** -->
  137.     <dynamicField name="*_l" stored="false" type="slong" multiValued="false" indexed="true"/>
  138.     <!-- *** This dynamicField is used by Sunspot! *** -->
  139.     <dynamicField name="*_lm" stored="false" type="slong" multiValued="true" indexed="true"/>
  140.     <!-- *** This dynamicField is used by Sunspot! *** -->
  141.     <dynamicField name="*_ls" stored="true" type="slong" multiValued="false" indexed="true"/>
  142.     <!-- *** This dynamicField is used by Sunspot! *** -->
  143.     <dynamicField name="*_lms" stored="true" type="slong" multiValued="true" indexed="true"/>
  144.     <!-- *** This dynamicField is used by Sunspot! *** -->
  145.     <dynamicField name="*_s" stored="false" type="string" multiValued="false" indexed="true"/>
  146.     <!-- *** This dynamicField is used by Sunspot! *** -->
  147.     <dynamicField name="*_sm" stored="false" type="string" multiValued="true" indexed="true"/>
  148.     <!-- *** This dynamicField is used by Sunspot! *** -->
  149.     <dynamicField name="*_ss" stored="true" type="string" multiValued="false" indexed="true"/>
  150.     <!-- *** This dynamicField is used by Sunspot! *** -->
  151.     <dynamicField name="*_sms" stored="true" type="string" multiValued="true" indexed="true"/>
  152.     <!-- *** This dynamicField is used by Sunspot! *** -->
  153.     <dynamicField name="*_it" stored="false" type="tint" multiValued="false" indexed="true"/>
  154.     <!-- *** This dynamicField is used by Sunspot! *** -->
  155.     <dynamicField name="*_itm" stored="false" type="tint" multiValued="true" indexed="true"/>
  156.     <!-- *** This dynamicField is used by Sunspot! *** -->
  157.     <dynamicField name="*_its" stored="true" type="tint" multiValued="false" indexed="true"/>
  158.     <!-- *** This dynamicField is used by Sunspot! *** -->
  159.     <dynamicField name="*_itms" stored="true" type="tint" multiValued="true" indexed="true"/>
  160.     <!-- *** This dynamicField is used by Sunspot! *** -->
  161.     <dynamicField name="*_ft" stored="false" type="tfloat" multiValued="false" indexed="true"/>
  162.     <!-- *** This dynamicField is used by Sunspot! *** -->
  163.     <dynamicField name="*_ftm" stored="false" type="tfloat" multiValued="true" indexed="true"/>
  164.     <!-- *** This dynamicField is used by Sunspot! *** -->
  165.     <dynamicField name="*_fts" stored="true" type="tfloat" multiValued="false" indexed="true"/>
  166.     <!-- *** This dynamicField is used by Sunspot! *** -->
  167.     <dynamicField name="*_ftms" stored="true" type="tfloat" multiValued="true" indexed="true"/>
  168.     <!-- *** This dynamicField is used by Sunspot! *** -->
  169.     <dynamicField name="*_dt" stored="false" type="tdate" multiValued="false" indexed="true"/>
  170.     <!-- *** This dynamicField is used by Sunspot! *** -->
  171.     <dynamicField name="*_dtm" stored="false" type="tdate" multiValued="true" indexed="true"/>
  172.     <!-- *** This dynamicField is used by Sunspot! *** -->
  173.     <dynamicField name="*_dts" stored="true" type="tdate" multiValued="false" indexed="true"/>
  174.     <!-- *** This dynamicField is used by Sunspot! *** -->
  175.     <dynamicField name="*_dtms" stored="true" type="tdate" multiValued="true" indexed="true"/>
  176.     <!-- *** This dynamicField is used by Sunspot! *** -->
  177.     <dynamicField name="*_textv" stored="false" termVectors="true" type="text" multiValued="true" indexed="true"/>
  178.     <!-- *** This dynamicField is used by Sunspot! *** -->
  179.     <dynamicField name="*_textsv" stored="true" termVectors="true" type="text" multiValued="true" indexed="true"/>
  180.     <!-- *** This dynamicField is used by Sunspot! *** -->
  181.     <dynamicField name="*_et" stored="false" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
  182.     <!-- *** This dynamicField is used by Sunspot! *** -->
  183.     <dynamicField name="*_etm" stored="false" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
  184.     <!-- *** This dynamicField is used by Sunspot! *** -->
  185.     <dynamicField name="*_ets" stored="true" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
  186.     <!-- *** This dynamicField is used by Sunspot! *** -->
  187.     <dynamicField name="*_etms" stored="true" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
  188.  
  189.     <!-- Type used to index the lat and lon components for the "location" FieldType -->
  190.     <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false" multiValued="false"/>
  191.     <dynamicField name="*_p" type="location" indexed="true" stored="true" multiValued="false"/>
  192.  
  193.     <dynamicField name="*_ll" stored="false" type="location" multiValued="false" indexed="true"/>
  194.     <dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
  195.     <dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
  196.     <dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
  197.    
  198.     <!-- required by Solr 4 -->
  199.     <field name="_version_" type="string" indexed="true" stored="true" multiValued="false" />
  200.   </fields>
  201.   <!-- Field to use to determine and enforce document uniqueness.
  202.      Unless this field is marked with required="false", it will be a required field
  203.   -->
  204.   <uniqueKey>id</uniqueKey>
  205.   <!-- field for the QueryParser to use when an explicit fieldname is absent -->
  206.   <defaultSearchField>text</defaultSearchField>
  207.   <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
  208.   <solrQueryParser defaultOperator="AND"/>
  209.   <!-- copyField commands copy one field to another at the time a document
  210.        is added to the index.  It's used either to index the same field differently,
  211.        or to add multiple fields to the same field for easier/faster searching.  -->
  212. </schema>
Advertisement
Add Comment
Please, Sign In to add comment