Advertisement
Guest User

Untitled

a guest
Nov 6th, 2016
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 27.03 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="TECSearchIndex" version="1.5">
  49.  
  50.     <types>
  51.             <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
  52.     <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
  53.  
  54.     <!-- boolean type: "true" or "false" -->
  55.     <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
  56.     <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
  57.     <fieldtype name="binary" class="solr.BinaryField"/>
  58.  
  59.     <!-- The optional sortMissingLast and sortMissingFirst attributes are
  60.         currently supported on types that are sorted internally as strings.
  61.            This includes "string","boolean","sint","slong","sfloat","sdouble","pdate"
  62.       - If sortMissingLast="true", then a sort on this field will cause documents
  63.         without the field to come after documents with the field,
  64.         regardless of the requested sort order (asc or desc).
  65.       - If sortMissingFirst="true", then a sort on this field will cause documents
  66.         without the field to come before documents with the field,
  67.         regardless of the requested sort order.
  68.       - If sortMissingLast="false" and sortMissingFirst="false" (the default),
  69.         then default lucene sorting will be used which places docs without the
  70.         field first in an ascending sort and last in a descending sort.
  71.    -->
  72.  
  73.     <!--
  74.      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
  75.    -->
  76.     <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  77.     <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  78.     <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  79.     <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  80.  
  81.     <!--
  82.     Numeric field types that index each value at various levels of precision
  83.     to accelerate range queries when the number of values between the range
  84.     endpoints is large. See the javadoc for NumericRangeQuery for internal
  85.     implementation details.
  86.  
  87.     Smaller precisionStep values (specified in bits) will lead to more tokens
  88.     indexed per value, slightly larger index size, and faster range queries.
  89.     A precisionStep of 0 disables indexing at different precision levels.
  90.    -->
  91.     <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  92.     <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  93.     <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  94.     <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  95.  
  96.     <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  97.         is a more restricted form of the canonical representation of dateTime
  98.         http://www.w3.org/TR/xmlschema-2/#dateTime
  99.         The trailing "Z" designates UTC time and is mandatory.
  100.         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  101.         All other components are mandatory.
  102.  
  103.         Expressions can also be used to denote calculations that should be
  104.         performed relative to "NOW" to determine the value, ie...
  105.  
  106.               NOW/HOUR
  107.                  ... Round to the start of the current hour
  108.               NOW-1DAY
  109.                  ... Exactly 1 day prior to now
  110.               NOW/DAY+6MONTHS+3DAYS
  111.                  ... 6 months and 3 days in the future from the start of
  112.                      the current day
  113.  
  114.         Consult the DateField javadocs for more information.
  115.  
  116.         Note: For faster range queries, consider the tdate type
  117.      -->
  118.     <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
  119.  
  120.     <!-- A Trie based date field for faster date range queries and date faceting. -->
  121.     <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
  122.  
  123.     <!-- The "RandomSortField" is not used to store or search any
  124.         data.  You can declare fields of this type it in your schema
  125.         to generate pseudo-random orderings of your docs for sorting
  126.         purposes.  The ordering is generated based on the field name
  127.         and the version of the index, As long as the index version
  128.         remains unchanged, and the same field name is reused,
  129.         the ordering of the docs will be consistent.
  130.         If you want different psuedo-random orderings of documents,
  131.         for the same version of the index, use a dynamicField and
  132.         change the name
  133.     -->
  134.     <fieldType name="random" class="solr.RandomSortField" indexed="true" />
  135.  
  136.     <!-- solr.TextField allows the specification of custom text analyzers
  137.         specified as a tokenizer and a list of token filters. Different
  138.         analyzers may be specified for indexing and querying.
  139.  
  140.         The optional positionIncrementGap puts space between multiple fields of
  141.         this type on the same document, with the purpose of preventing false phrase
  142.         matching across fields.
  143.  
  144.         For more info on customizing your analyzer chain, please see
  145.         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  146.     -->
  147.  
  148.     <!-- One can also specify an existing Analyzer class that has a
  149.         default constructor via the class attribute on the analyzer element
  150.    <fieldType name="text_greek" class="solr.TextField">
  151.      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
  152.    </fieldType>
  153.    -->
  154.  
  155.     <!-- A text field that only splits on whitespace for exact matching of words -->
  156.     <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
  157.       <analyzer>
  158.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  159.       </analyzer>
  160.     </fieldType>
  161.  
  162.     <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
  163.        words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
  164.        so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
  165.        Synonyms and stopwords are customized by external files, and stemming is enabled.
  166.        The attribute autoGeneratePhraseQueries="true" (the default) causes words that get split to
  167.        form phrase queries. For example, WordDelimiterFilter splitting text:pdp-11 will cause the parser
  168.        to generate text:"pdp 11" rather than (text:PDP OR text:11).
  169.        NOTE: autoGeneratePhraseQueries="true" tends to not work well for non whitespace delimited languages.
  170.        -->
  171.     <fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  172.       <analyzer type="index">
  173.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  174.         <!-- in this example, we will only use synonyms at query time
  175.        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  176.        -->
  177.         <!-- Case insensitive stop word removal.
  178.          add enablePositionIncrements=true in both the index and query
  179.          analyzers to leave a 'gap' for more accurate phrase queries.
  180.        -->
  181.         <filter class="solr.StopFilterFactory"
  182.                ignoreCase="true"
  183.                words="stopwords.txt"
  184.                enablePositionIncrements="true"
  185.                />
  186.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
  187.         <filter class="solr.LowerCaseFilterFactory"/>
  188.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  189.         <filter class="solr.PorterStemFilterFactory"/>
  190.       </analyzer>
  191.       <analyzer type="query">
  192.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  193.         <filter class="solr.KeywordRepeatFilterFactory"/>
  194.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  195.         <filter class="solr.StopFilterFactory"
  196.                ignoreCase="true"
  197.                words="stopwords.txt"
  198.                enablePositionIncrements="true"
  199.                />
  200.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
  201.         <filter class="solr.LowerCaseFilterFactory"/>
  202.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  203.         <filter class="solr.PorterStemFilterFactory"/>
  204.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  205.       </analyzer>
  206.     </fieldType>
  207.  
  208.     <!-- A copy of text that has the HTMLStripCharFilterFactory as the first index analyzer, so that html can be provided -->
  209.     <fieldType name="htmltext" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  210.       <analyzer type="index">
  211.         <charFilter class="solr.HTMLStripCharFilterFactory"/>
  212.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  213.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/>
  214.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
  215.         <filter class="solr.LowerCaseFilterFactory"/>
  216.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  217.         <filter class="solr.PorterStemFilterFactory"/>
  218.       </analyzer>
  219.       <analyzer type="query">
  220.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  221.         <filter class="solr.KeywordRepeatFilterFactory"/>
  222.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  223.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/>
  224.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
  225.         <filter class="solr.LowerCaseFilterFactory"/>
  226.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  227.         <filter class="solr.PorterStemFilterFactory"/>
  228.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  229.       </analyzer>
  230.     </fieldType>
  231.  
  232.     <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
  233.         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
  234.     <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
  235.       <analyzer>
  236.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  237.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
  238.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  239.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
  240.         <filter class="solr.LowerCaseFilterFactory"/>
  241.         <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  242.         <filter class="solr.EnglishMinimalStemFilterFactory"/>
  243.         <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
  244.             possible with WordDelimiterFilter in conjuncton with stemming. -->
  245.         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  246.       </analyzer>
  247.     </fieldType>
  248.  
  249.     <!-- Text optimized for spelling corrections, with minimal alterations (e.g. no stemming) -->
  250.     <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100">
  251.         <analyzer>
  252.             <tokenizer class="solr.StandardTokenizerFactory" />
  253.             <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  254.             <filter class="solr.LengthFilterFactory" min="4" max="20" />
  255.             <filter class="solr.LowerCaseFilterFactory" />
  256.             <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
  257.         </analyzer>
  258.     </fieldType>
  259.  
  260.     <!-- Text optimized for spelling corrections, with minimal alterations (e.g. no stemming) but also html filtering -->
  261.     <fieldType name="textSpellHtml" class="solr.TextField" positionIncrementGap="100">
  262.         <analyzer>
  263.             <charFilter class="solr.HTMLStripCharFilterFactory"/>
  264.             <tokenizer class="solr.StandardTokenizerFactory" />
  265.             <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  266.             <filter class="solr.LengthFilterFactory" min="4" max="20" />
  267.             <filter class="solr.LowerCaseFilterFactory" />
  268.             <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
  269.         </analyzer>
  270.     </fieldType>
  271.  
  272.     <!-- A general unstemmed text field - good if one does not know the language of the field -->
  273.     <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
  274.       <analyzer type="index">
  275.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  276.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  277.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
  278.         <filter class="solr.LowerCaseFilterFactory"/>
  279.       </analyzer>
  280.       <analyzer type="query">
  281.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  282.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  283.         <filter class="solr.StopFilterFactory"
  284.                ignoreCase="true"
  285.                words="stopwords.txt"
  286.                enablePositionIncrements="true"
  287.                />
  288.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
  289.         <filter class="solr.LowerCaseFilterFactory"/>
  290.       </analyzer>
  291.     </fieldType>
  292.  
  293.  
  294.     <!-- A general unstemmed text field that indexes tokens normally and also
  295.         reversed (via ReversedWildcardFilterFactory), to enable more efficient
  296.      leading wildcard queries. -->
  297.     <fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
  298.       <analyzer type="index">
  299.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  300.         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  301.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
  302.         <filter class="solr.LowerCaseFilterFactory"/>
  303.         <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
  304.           maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
  305.       </analyzer>
  306.       <analyzer type="query">
  307.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  308.         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  309.         <filter class="solr.StopFilterFactory"
  310.                ignoreCase="true"
  311.                words="stopwords.txt"
  312.                enablePositionIncrements="true"
  313.                />
  314.         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
  315.         <filter class="solr.LowerCaseFilterFactory"/>
  316.       </analyzer>
  317.     </fieldType>
  318.  
  319.     <!-- charFilter + WhitespaceTokenizer  -->
  320.     <!--
  321.    <fieldType name="textCharNorm" class="solr.TextField" positionIncrementGap="100" >
  322.      <analyzer>
  323.        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
  324.        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  325.      </analyzer>
  326.    </fieldType>
  327.    -->
  328.  
  329.     <!-- This is an example of using the KeywordTokenizer along
  330.         With various TokenFilterFactories to produce a sortable field
  331.         that does not include some properties of the source text
  332.      -->
  333.     <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
  334.       <analyzer>
  335.         <!-- KeywordTokenizer does no actual tokenizing, so the entire
  336.             input string is preserved as a single token
  337.          -->
  338.         <tokenizer class="solr.KeywordTokenizerFactory"/>
  339.         <!-- The LowerCase TokenFilter does what you expect, which can be
  340.             when you want your sorting to be case insensitive
  341.          -->
  342.         <filter class="solr.LowerCaseFilterFactory" />
  343.         <!-- The TrimFilter removes any leading or trailing whitespace -->
  344.         <filter class="solr.TrimFilterFactory" />
  345.         <!-- The PatternReplaceFilter gives you the flexibility to use
  346.             Java Regular expression to replace any sequence of characters
  347.             matching a pattern with an arbitrary replacement string,
  348.             which may include back references to portions of the original
  349.             string matched by the pattern.
  350.  
  351.             See the Java Regular Expression documentation for more
  352.             information on pattern and replacement string syntax.
  353.  
  354.             http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
  355.          -->
  356.         <filter class="solr.PatternReplaceFilterFactory"
  357.                pattern="([^a-z])" replacement="" replace="all"
  358.        />
  359.       </analyzer>
  360.     </fieldType>
  361.  
  362.     <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
  363.       <analyzer>
  364.         <tokenizer class="solr.StandardTokenizerFactory"/>
  365.         <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
  366.       </analyzer>
  367.     </fieldtype>
  368.  
  369.     <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
  370.       <analyzer>
  371.         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  372.         <!--
  373.        The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  374.        a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
  375.        Attributes of the DelimitedPayloadTokenFilterFactory :
  376.         "delimiter" - a one character delimiter. Default is | (pipe)
  377.      "encoder" - how to encode the following value into a playload
  378.         float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  379.         integer -> o.a.l.a.p.IntegerEncoder
  380.         identity -> o.a.l.a.p.IdentityEncoder
  381.            Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
  382.         -->
  383.         <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
  384.       </analyzer>
  385.     </fieldtype>
  386.  
  387.     <!-- lowercases the entire field value, keeping it as a single token.  -->
  388.     <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
  389.       <analyzer>
  390.         <tokenizer class="solr.KeywordTokenizerFactory"/>
  391.         <filter class="solr.LowerCaseFilterFactory" />
  392.       </analyzer>
  393.     </fieldType>
  394.  
  395.     <fieldType name="text_path" class="solr.TextField" positionIncrementGap="100">
  396.       <analyzer>
  397.         <tokenizer class="solr.PathHierarchyTokenizerFactory"/>
  398.       </analyzer>
  399.     </fieldType>
  400.  
  401.     <!-- since fields of this type are by default not stored or indexed,
  402.         any data added to them will be ignored outright.  -->
  403.     <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
  404.  
  405.     <!-- This point type indexes the coordinates as separate fields (subFields)
  406.      If subFieldType is defined, it references a type, and a dynamic field
  407.      definition is created matching *___<typename>.  Alternately, if
  408.      subFieldSuffix is defined, that is used to create the subFields.
  409.      Example: if subFieldType="double", then the coordinates would be
  410.        indexed in fields myloc_0___double,myloc_1___double.
  411.      Example: if subFieldSuffix="_d" then the coordinates would be indexed
  412.        in fields myloc_0_d,myloc_1_d
  413.      The subFields are an implementation detail of the fieldType, and end
  414.      users normally should not need to know about them.
  415.     -->
  416.     <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
  417.  
  418.     <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
  419.     <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
  420.  
  421.    <!--
  422.    A Geohash is a compact representation of a latitude longitude pair in a single field.
  423.    See http://wiki.apache.org/solr/SpatialSearch
  424.   -->
  425.     <fieldtype name="geohash" class="solr.GeoHashField"/>
  426.     </types>
  427.  
  428.     <fields>
  429.        
  430.         <field name='_documentid' type='string' indexed='true' stored='true' required='true' />
  431.         <field name='ID' type='tint' indexed='true' stored='true' required='true' />
  432.         <field name='ClassName' type='string' indexed='true' stored='true' required='true' />
  433.         <field name='ClassHierarchy' type='string' indexed='true' stored='true' required='true' multiValued='true' />
  434.         <field name='_text' type='htmltext' indexed='true' stored='true' multiValued='true' />
  435.         <field name='SiteTree_Title' type='text' indexed='true' stored='true' multiValued=''/>
  436.         <field name='File_Title' type='text' indexed='true' stored='true' multiValued=''/>
  437.         <field name='SiteTree_Content' type='text' indexed='true' stored='true' multiValued=''/>
  438.         <field name='File_Content' type='text' indexed='true' stored='true' multiValued=''/>
  439.         <field name='File_FileContent' type='text' indexed='true' stored='true' multiValued=''/>
  440.         <field name='SiteTree_SearchBoost' type='text' indexed='true' stored='true' multiValued=''/>
  441.         <field name='SiteTree_ShowInSearch' type='boolean' indexed='true' stored='true' multiValued=''/>
  442.         <field name='File_ShowInSearch' type='boolean' indexed='true' stored='true' multiValued=''/>
  443.         <field name='SiteTree_CanViewType' type='string' indexed='true' stored='true' multiValued=''/>
  444.         <field name='File_CanViewType' type='string' indexed='true' stored='true' multiValued=''/>
  445.         <field name='File_ViewerGroups_ID' type='tint' indexed='true' stored='true' multiValued='true'/>
  446.         <field name='_subsite' type='tint' indexed='true' stored='true' multiValued=''/>
  447.         <field name='_versionedstage' type='string' indexed='true' stored='true' multiValued=''/>
  448.         <field name='SiteTree_LastEdited' type='tdate' indexed='true' stored='true' multiValued=''/>
  449.         <field name='File_LastEdited' type='tdate' indexed='true' stored='true' multiValued=''/>
  450.  
  451.         <!-- Additional custom fields for spell checking -->
  452.         <field name='_spellcheckText' type='textSpellHtml' indexed='true' stored='false' multiValued='true' />
  453.  
  454.         <!-- Additional custom fields for sorting -->
  455.         <field name='Title' type='alphaOnlySort' indexed='true' stored='true' />
  456.         <field name='LastEdited' type='tdate' indexed='true' stored='true' />
  457.  
  458.         <!-- Additional custom fields for spell checking -->
  459.         <field name='spellcheckData' type='textSpell' stored='true' indexed='true' multiValued='true' />
  460.         <field name='highlightData' type='htmltext' stored='true' indexed='true' multiValued='true' />
  461.  
  462.         <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
  463.     </fields>
  464.  
  465.     <copyField source='SiteTree_Title' dest='_text' />
  466.     <copyField source='File_Title' dest='_text' />
  467.     <copyField source='SiteTree_Content' dest='_text' />
  468.     <copyField source='File_Content' dest='_text' />
  469.     <copyField source='File_FileContent' dest='_text' />
  470.     <copyField source='SiteTree_SearchBoost' dest='_text' />
  471.     <copyField source='SiteTree_Title' dest='_spellcheckText' />
  472.     <copyField source='File_Title' dest='_spellcheckText' />
  473.     <copyField source='SiteTree_Content' dest='_spellcheckText' />
  474.     <copyField source='File_Content' dest='_spellcheckText' />
  475.     <copyField source='File_FileContent' dest='_spellcheckText' />
  476.     <copyField source='SiteTree_SearchBoost' dest='_spellcheckText' />
  477.     <copyField source='SiteTree_Title' dest='spellcheckData'/>
  478.     <copyField source='SiteTree_Title' dest='highlightData' maxChars='10000'/>
  479.     <copyField source='SiteTree_Content' dest='spellcheckData'/>
  480.     <copyField source='SiteTree_Content' dest='highlightData' maxChars='10000'/>
  481.     <copyField source='File_Title' dest='spellcheckData'/>
  482.     <copyField source='File_Content' dest='highlightData' maxChars='10000'/>
  483.  
  484.     <uniqueKey>_documentid</uniqueKey>
  485.  
  486.     <defaultSearchField>_text</defaultSearchField>
  487.  
  488.     <solrQueryParser defaultOperator="OR"/>
  489.  
  490. </schema>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement