设为首页 收藏本站
查看: 731|回复: 0

[经验分享] 指尖上的电商---(4).net开发solr

[复制链接]

尚未签到

发表于 2017-12-19 11:24:45 | 显示全部楼层 |阅读模式
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?>  

  

  
<schema name=&quot;example&quot; version=&quot;1.5&quot;>
  

  <field name=&quot;_version_&quot; type=&quot;long&quot; indexed=&quot;true&quot; stored=&quot;true&quot;/>
  <field name=&quot;_root_&quot; type=&quot;string&quot; indexed=&quot;true&quot; stored=&quot;false&quot;/>
  

  

  <field name=&quot;ProductCode&quot; type=&quot;string&quot; indexed=&quot;true&quot; stored=&quot;true&quot; required=&quot;true&quot; multiValued=&quot;false&quot; />
  <field name=&quot;ProductName&quot; type=&quot;text_general&quot; indexed=&quot;true&quot; stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_i&quot;  type=&quot;int&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_is&quot; type=&quot;int&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot;  multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_s&quot;  type=&quot;string&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot; />
  <dynamicField name=&quot;*_ss&quot; type=&quot;string&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot; multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_l&quot;  type=&quot;long&quot;   indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_ls&quot; type=&quot;long&quot;   indexed=&quot;true&quot;  stored=&quot;true&quot;  multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_t&quot;  type=&quot;text_general&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_txt&quot; type=&quot;text_general&quot;   indexed=&quot;true&quot;  stored=&quot;true&quot; multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_en&quot;  type=&quot;text_en&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot; multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_b&quot;  type=&quot;boolean&quot; indexed=&quot;true&quot; stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_bs&quot; type=&quot;boolean&quot; indexed=&quot;true&quot; stored=&quot;true&quot;  multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_f&quot;  type=&quot;float&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_fs&quot; type=&quot;float&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;  multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_d&quot;  type=&quot;double&quot; indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_ds&quot; type=&quot;double&quot; indexed=&quot;true&quot;  stored=&quot;true&quot;  multiValued=&quot;true&quot;/>
  

  <!-- Type used to index the lat and lon components for the &quot;location&quot; FieldType -->
  <dynamicField name=&quot;*_coordinate&quot;  type=&quot;tdouble&quot; indexed=&quot;true&quot;  stored=&quot;false&quot; />
  

  <dynamicField name=&quot;*_dt&quot;  type=&quot;date&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_dts&quot; type=&quot;date&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot; multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;*_p&quot;  type=&quot;location&quot; indexed=&quot;true&quot; stored=&quot;true&quot;/>
  

  <!-- some trie-coded dynamic fields for faster range queries -->
  <dynamicField name=&quot;*_ti&quot; type=&quot;tint&quot;    indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_tl&quot; type=&quot;tlong&quot;   indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_tf&quot; type=&quot;tfloat&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_td&quot; type=&quot;tdouble&quot; indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  <dynamicField name=&quot;*_tdt&quot; type=&quot;tdate&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  

  <dynamicField name=&quot;*_c&quot;   type=&quot;currency&quot; indexed=&quot;true&quot;  stored=&quot;true&quot;/>
  

  <dynamicField name=&quot;ignored_*&quot; type=&quot;ignored&quot; multiValued=&quot;true&quot;/>
  <dynamicField name=&quot;attr_*&quot; type=&quot;text_general&quot; indexed=&quot;true&quot; stored=&quot;true&quot; multiValued=&quot;true&quot;/>
  

  <dynamicField name=&quot;random_*&quot; type=&quot;random&quot; />
  

  <!-- uncomment the following to ignore any fields that don't already match an existing
  field name or dynamic field, rather than reporting them as an error.
  alternately, change the type=&quot;ignored&quot; to some other type e.g. &quot;text&quot; if you want
  unknown fields indexed and/or stored by default -->
  <!--dynamicField name=&quot;*&quot; type=&quot;ignored&quot; multiValued=&quot;true&quot; /-->
  

  

  

  <!-- Field to use to determine and enforce document uniqueness.
  Unless this field is marked with required=&quot;false&quot;, it will be a required field
  -->
  <uniqueKey>ProductCode</uniqueKey>
  

  

  


  <fieldType name=&quot;string&quot;>  

  <!-- boolean type: &quot;true&quot; or &quot;false&quot; -->

  <fieldType name=&quot;boolean&quot;>  

  <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
  currently supported on types that are sorted internally as strings
  and on numeric types.
  This includes &quot;string&quot;,&quot;boolean&quot;, and, as of 3.5 (and 4.x),
  int, float, long, date, double, including the &quot;Trie&quot; variants.
  - If sortMissingLast=&quot;true&quot;, then a sort on this field will cause documents
  without the field to come after documents with the field,
  regardless of the requested sort order (asc or desc).
  - If sortMissingFirst=&quot;true&quot;, then a sort on this field will cause documents
  without the field to come before documents with the field,
  regardless of the requested sort order.
  - If sortMissingLast=&quot;false&quot; and sortMissingFirst=&quot;false&quot; (the default),
  then default lucene sorting will be used which places docs without the
  field first in an ascending sort and last in a descending sort.
  -->   
  

  <!--
  Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
  

  These fields support doc values, but they require the field to be
  single-valued and either be required or have a default value.
  -->

  <fieldType name=&quot;int&quot;>
  <fieldType name=&quot;float&quot;>
  <fieldType name=&quot;long&quot;>
  <fieldType name=&quot;double&quot;>  

  <!--
  Numeric field types that index each value at various levels of precision
  to accelerate range queries when the number of values between the range
  endpoints is large. See the javadoc for NumericRangeQuery for internal
  implementation details.
  

  Smaller precisionStep values (specified in bits) will lead to more tokens

  indexed per value, slightly larger index>  A precisionStep of 0 disables indexing at different precision levels.
  -->

  <fieldType name=&quot;tint&quot;>
  <fieldType name=&quot;tfloat&quot;>
  <fieldType name=&quot;tlong&quot;>
  <fieldType name=&quot;tdouble&quot;>  

  <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  is a more restricted form of the canonical representation of dateTime
  http://www.w3.org/TR/xmlschema-2/#dateTime   
  The trailing &quot;Z&quot; designates UTC time and is mandatory.
  Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  All other components are mandatory.
  

  Expressions can also be used to denote calculations that should be

  performed>  

  NOW/HOUR
  ... Round to the start of the current hour
  NOW-1DAY
  ... Exactly 1 day prior to now
  NOW/DAY+6MONTHS+3DAYS
  ... 6 months and 3 days in the future from the start of
  the current day
  Consult the DateField javadocs for more information.
  

  Note: For faster range queries, consider the tdate type
  -->

  <fieldType name=&quot;date&quot;>  


  <!-- A Trie based date field for faster date range queries and date>
  <fieldType name=&quot;tdate&quot;>  

  

  <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->

  <fieldtype name=&quot;binary&quot;>  

  <!--
  Note:
  These should only be used for compatibility with existing indexes (created with lucene or older Solr versions).
  Use Trie based fields instead. As of Solr 3.5 and 4.x, Trie based fields support sortMissingFirst/Last
  

  Plain numeric field types that store and index the text
  value verbatim (and hence don't correctly support range queries, since the
  lexicographic ordering isn't equal to the numeric ordering)
  

  NOTE: These field types are deprecated will be removed in Solr 5.0!
  -->

  <fieldType name=&quot;pint&quot;>
  <fieldType name=&quot;plong&quot;>
  <fieldType name=&quot;pfloat&quot;>
  <fieldType name=&quot;pdouble&quot;>
  <fieldType name=&quot;pdate&quot;>  

  <!-- The &quot;RandomSortField&quot; is not used to store or search any
  data.  You can declare fields of this type it in your schema
  to generate pseudo-random orderings of your docs for sorting
  or function purposes.  The ordering is generated based on the field
  name and the version of the index. As long as the index version
  remains unchanged, and the same field name is reused,
  the ordering of the docs will be consistent.  
  If you want different psuedo-random orderings of documents,
  for the same version of the index, use a dynamicField and
  change the field name in the request.
  -->

  <fieldType name=&quot;random&quot;>  

  <!-- solr.TextField allows the specification of custom text analyzers
  specified as a tokenizer and a list of token filters. Different
  analyzers may be specified for indexing and querying.
  

  The optional positionIncrementGap puts space between multiple fields of
  this type on the same document, with the purpose of preventing false phrase
  matching across fields.
  

  For more info on customizing your analyzer chain, please see
  http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  -->
  


  <!-- One can also specify an existing Analyzer>
  default constructor via the>  Example:

  <fieldType name=&quot;text_greek&quot;>
  <analyzer>  </fieldType>
  -->
  

  <!-- A text field that only splits on whitespace for exact matching of words -->

  <fieldType name=&quot;text_ws&quot;>  <analyzer>

  <tokenizer>  </analyzer>
  </fieldType>
  

  <!-- A text type for English text where stopwords and synonyms are managed using the REST API -->

  <fieldType name=&quot;managed_en&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  

  <!-- A general text field that has reasonable, generic
  cross-language defaults: it tokenizes with StandardTokenizer,
  removes stop words from case-insensitive &quot;stopwords.txt&quot;
  (empty by default), and down cases.  At query time only, it
  also applies synonyms. -->

  <fieldType name=&quot;text_general&quot;>  <analyzer type=&quot;index&quot;>

  <tokenizer>
  <filter>  <!-- in this example, we will only use synonyms at query time

  <filter>  -->

  <filter>  </analyzer>
  <analyzer type=&quot;query&quot;>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  

  <!-- A text field with defaults appropriate for English: it
  tokenizes with StandardTokenizer, removes English stop words
  (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and
  finally applies Porter's stemming.  The query time analyzer
  also applies synonyms from synonyms.txt. -->

  <fieldType name=&quot;text_en&quot;>  <analyzer type=&quot;index&quot;>

  <tokenizer>  <!-- in this example, we will only use synonyms at query time

  <filter>  -->
  <!-- Case insensitive stop word removal.
  -->

  <filter>  ignoreCase=&quot;true&quot;
  words=&quot;lang/stopwords_en.txt&quot;
  />

  <filter>
  <filter>
  <filter>  <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:

  <filter>  -->

  <filter>  </analyzer>
  <analyzer type=&quot;query&quot;>

  <tokenizer>
  <filter>
  <filter>  ignoreCase=&quot;true&quot;
  words=&quot;lang/stopwords_en.txt&quot;
  />

  <filter>
  <filter>
  <filter>  <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:

  <filter>  -->

  <filter>  </analyzer>
  </fieldType>
  

  <!-- A text field with defaults appropriate for English, plus
  aggressive word-splitting and autophrase features enabled.
  This field is just like text_en, except it adds
  WordDelimiterFilter to enable splitting and matching of
  words on case-change, alpha numeric boundaries, and
  non-alphanumeric chars.  This means certain compound word
  cases will work, for example query &quot;wi fi&quot; will match
  document &quot;WiFi&quot; or &quot;wi-fi&quot;.
  -->

  <fieldType name=&quot;text_en_splitting&quot;>  <analyzer type=&quot;index&quot;>

  <tokenizer>  <!-- in this example, we will only use synonyms at query time

  <filter>  -->
  <!-- Case insensitive stop word removal.
  -->

  <filter>  ignoreCase=&quot;true&quot;
  words=&quot;lang/stopwords_en.txt&quot;
  />

  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  <analyzer type=&quot;query&quot;>

  <tokenizer>
  <filter>
  <filter>  ignoreCase=&quot;true&quot;
  words=&quot;lang/stopwords_en.txt&quot;
  />

  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  


  <!-- Less flexible matching, but less false matches.  Probably not>  but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->

  <fieldType name=&quot;text_en_splitting_tight&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <filter>
  <filter>
  <filter>  <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
  possible with WordDelimiterFilter in conjuncton with stemming. -->

  <filter>  </analyzer>
  </fieldType>
  

  <!-- Just like text_general except it reverses the characters of
  each token, to enable more efficient leading wildcard queries. -->

  <fieldType name=&quot;text_general_rev&quot;>  <analyzer type=&quot;index&quot;>

  <tokenizer>
  <filter>
  <filter>
  <filter>  maxPosAsterisk=&quot;3&quot; maxPosQuestion=&quot;2&quot; maxFractionAsterisk=&quot;0.33&quot;/>
  </analyzer>
  <analyzer type=&quot;query&quot;>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  

  <!-- charFilter + WhitespaceTokenizer  -->
  <!--

  <fieldType name=&quot;text_char_norm&quot;>  <analyzer>

  <charFilter>
  <tokenizer>  </analyzer>
  </fieldType>
  -->
  

  <!-- This is an example of using the KeywordTokenizer along
  With various TokenFilterFactories to produce a sortable field
  that does not include some properties of the source text
  -->

  <fieldType name=&quot;alphaOnlySort&quot;>  <analyzer>
  <!-- KeywordTokenizer does no actual tokenizing, so the entire
  input string is preserved as a single token
  -->

  <tokenizer>  <!-- The LowerCase TokenFilter does what you expect, which can be
  when you want your sorting to be case insensitive
  -->

  <filter>  <!-- The TrimFilter removes any leading or trailing whitespace -->

  <filter>  <!-- The PatternReplaceFilter gives you the flexibility to use
  Java Regular expression to replace any sequence of characters
  matching a pattern with an arbitrary replacement string,
  which may include back references to portions of the original
  string matched by the pattern.
  See the Java Regular Expression documentation for more
  information on pattern and replacement string syntax.
  http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html
  -->

  <filter>  pattern=&quot;([^a-z])&quot; replacement=&quot;&quot; replace=&quot;all&quot;
  />
  </analyzer>
  </fieldType>

  <fieldtype name=&quot;phonetic&quot; stored=&quot;false&quot; indexed=&quot;true&quot;>  <analyzer>

  <tokenizer>
  <filter>  </analyzer>
  </fieldtype>
  


  <fieldtype name=&quot;payloads&quot; stored=&quot;false&quot; indexed=&quot;true&quot;>  <analyzer>

  <tokenizer>  <!--
  The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  a token of &quot;foo|1.4&quot;  would be indexed as &quot;foo&quot; with a payload of 1.4f
  Attributes of the DelimitedPayloadTokenFilterFactory :
  &quot;delimiter&quot; - a one character delimiter. Default is | (pipe)
  &quot;encoder&quot; - how to encode the following value into a playload
  float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  integer -> o.a.l.a.p.IntegerEncoder
  identity -> o.a.l.a.p.IdentityEncoder

  Fully Qualified>  -->

  <filter>  </analyzer>
  </fieldtype>
  

  <!-- lowercases the entire field value, keeping it as a single token.  -->

  <fieldType name=&quot;lowercase&quot;>  <analyzer>

  <tokenizer>
  <filter>  </analyzer>
  </fieldType>
  

  <!--
  Example of using PathHierarchyTokenizerFactory at index time, so
  queries for paths match documents at that path, or in descendent paths
  -->

  <fieldType name=&quot;descendent_path&quot;>  <analyzer type=&quot;index&quot;>

  <tokenizer>  </analyzer>
  <analyzer type=&quot;query&quot;>

  <tokenizer>  </analyzer>
  </fieldType>
  <!--
  Example of using PathHierarchyTokenizerFactory at query time, so
  queries for paths match documents at that path, or in ancestor paths
  -->

  <fieldType name=&quot;ancestor_path&quot;>  <analyzer type=&quot;index&quot;>

  <tokenizer>  </analyzer>
  <analyzer type=&quot;query&quot;>

  <tokenizer>  </analyzer>
  </fieldType>
  

  <!-- since fields of this type are by default not stored or indexed,
  any data added to them will be ignored outright.  -->

  <fieldtype name=&quot;ignored&quot; stored=&quot;false&quot; indexed=&quot;false&quot; multiValued=&quot;true&quot;>  

  <!-- This point type indexes the coordinates as separate fields (subFields)
  If subFieldType is defined, it references a type, and a dynamic field

  definition is created matching *___<typename>. >  subFieldSuffix is defined, that is used to create the subFields.
  Example: if subFieldType=&quot;double&quot;, then the coordinates would be
  indexed in fields myloc_0___double,myloc_1___double.
  Example: if subFieldSuffix=&quot;_d&quot; then the coordinates would be indexed
  in fields myloc_0_d,myloc_1_d
  The subFields are an implementation detail of the fieldType, and end
  users normally should not need to know about them.
  -->

  <fieldType name=&quot;point&quot;>  

  <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->

  <fieldType name=&quot;location&quot;>  


  <!-- An>  For more information about this and other Spatial fields new to Solr 4, see:
  http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
  -->

  <fieldType name=&quot;location_rpt&quot;>  geo=&quot;true&quot; distErrPct=&quot;0.025&quot; maxDistErr=&quot;0.000009&quot; units=&quot;degrees&quot; />
  

  <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
  Parameters:
  defaultCurrency: Specifies the default currency if none specified. Defaults to &quot;USD&quot;
  precisionStep:   Specifies the precisionStep for the TrieLong field used for the amount
  providerClass:   Lets you plug in other exchange provider backend:
  solr.FileExchangeRateProvider is the default and takes one parameter:
  currencyConfig: name of an xml file holding exchange rates
  solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
  ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)
  refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)
  -->

  <fieldType name=&quot;currency&quot;>  

  

  <!-- some examples for different languages (generally ordered by ISO code) -->
  

  <!-- Arabic -->

  <fieldType name=&quot;text_ar&quot;>  <analyzer>

  <tokenizer>  <!-- for any non-arabic -->

  <filter>
  <filter>  <!-- normalizes ﻯ to ﻱ, etc -->

  <filter>
  <filter>  </analyzer>
  </fieldType>
  

  <!-- Bulgarian -->

  <fieldType name=&quot;text_bg&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Catalan -->

  <fieldType name=&quot;text_ca&quot;>  <analyzer>

  <tokenizer>  <!-- removes l', etc -->

  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) -->

  <fieldType name=&quot;text_cjk&quot;>  <analyzer>

  <tokenizer>
  <!-- normalize>
  <filter>  <!-- for any non-CJK -->

  <filter>
  <filter>  </analyzer>
  </fieldType>
  

  <!-- Kurdish -->

  <fieldType name=&quot;text_ckb&quot;>  <analyzer>

  <tokenizer>
  <filter>  <!-- for any latin text -->

  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  

  <!-- Czech -->

  <fieldType name=&quot;text_cz&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Danish -->

  <fieldType name=&quot;text_da&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- German -->

  <fieldType name=&quot;text_de&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>
  <!-- more aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Greek -->

  <fieldType name=&quot;text_el&quot;>  <analyzer>

  <tokenizer>  <!-- greek specific lowercase for sigma -->

  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Spanish -->

  <fieldType name=&quot;text_es&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- more aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Basque -->

  <fieldType name=&quot;text_eu&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Persian -->

  <fieldType name=&quot;text_fa&quot;>  <analyzer>
  <!-- for ZWNJ -->

  <charFilter>
  <tokenizer>
  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Finnish -->

  <fieldType name=&quot;text_fi&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- French -->

  <fieldType name=&quot;text_fr&quot;>  <analyzer>

  <tokenizer>  <!-- removes l', etc -->

  <filter>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>
  <!-- more aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Irish -->

  <fieldType name=&quot;text_ga&quot;>  <analyzer>

  <tokenizer>  <!-- removes d', etc -->

  <filter>  <!-- removes n-, etc. position increments is intentionally false! -->

  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Galician -->

  <fieldType name=&quot;text_gl&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Hindi -->

  <fieldType name=&quot;text_hi&quot;>  <analyzer>

  <tokenizer>
  <filter>  <!-- normalizes unicode representation -->

  <filter>  <!-- normalizes variation in spelling -->

  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Hungarian -->

  <fieldType name=&quot;text_hu&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Armenian -->

  <fieldType name=&quot;text_hy&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Indonesian -->

  <fieldType name=&quot;text_id&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>  <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false -->

  <filter>  </analyzer>
  </fieldType>
  <!-- Italian -->

  <fieldType name=&quot;text_it&quot;>  <analyzer>

  <tokenizer>  <!-- removes l', etc -->

  <filter>
  <filter>
  <filter>
  <filter>
  <!-- more aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Japanese using morphological analysis (see text_cjk for a configuration using bigramming)
  

  NOTE: If you want to optimize search for precision, use default operator AND in your query
  parser config with <solrQueryParser defaultOperator=&quot;AND&quot;/> further down in this file.  Use
  OR if you would like to optimize for recall (default).
  -->

  <fieldType name=&quot;text_ja&quot;>  <analyzer>
  <!-- Kuromoji Japanese morphological analyzer/tokenizer (JapaneseTokenizer)
  

  Kuromoji has a search mode (default) that does segmentation useful for search.  A heuristic
  is used to segment compounds into its parts and the compound itself is kept as synonym.
  

  Valid values for attribute mode are:
  normal: regular segmentation
  search: segmentation useful for search with synonyms compounds (default)
  extended: same as search mode, but unigrams unknown words (experimental)
  

  For some applications it might be good to use search mode for indexing and normal mode for
  queries to reduce recall and prevent parts of compounds from being matched and highlighted.
  Use <analyzer type=&quot;index&quot;> and <analyzer type=&quot;query&quot;> for this and mode normal in query.
  

  Kuromoji also has a convenient user dictionary feature that allows overriding the statistical
  model with your own entries for segmentation, part-of-speech tags and readings without a need
  to specify weights.  Notice that user dictionaries have not been subject to extensive testing.
  

  User dictionary attributes are:
  userDictionary: user dictionary filename
  userDictionaryEncoding: user dictionary encoding (default is UTF-8)
  

  See lang/userdict_ja.txt for a sample user dictionary file.
  

  Punctuation characters are discarded by default.  Use discardPunctuation=&quot;false&quot; to keep them.
  

  See http://wiki.apache.org/solr/JapaneseLanguageSupport for more on Japanese language support.
  -->

  <tokenizer>
  <!--<tokenizer>  <!-- Reduces inflected verbs and adjectives to their base/dictionary forms (辞書形) -->

  <filter>  <!-- Removes tokens with certain part-of-speech tags -->

  <filter>  <!-- Normalizes full-width romaji to half-width and half-width kana to full-width (Unicode NFKC subset) -->

  <filter>  <!-- Removes common tokens typically not useful for search, but have a negative effect on ranking -->

  <filter>  <!-- Normalizes common katakana spelling variations by removing any last long sound character (U+30FC) -->

  <filter>  <!-- Lower-cases romaji characters -->

  <filter>  </analyzer>
  </fieldType>
  <!-- Latvian -->

  <fieldType name=&quot;text_lv&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Dutch -->

  <fieldType name=&quot;text_nl&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Norwegian -->

  <fieldType name=&quot;text_no&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>
  <!-- singular/plural: <filter>  <!-- The &quot;light&quot; and &quot;minimal&quot; stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both -->
  </analyzer>
  </fieldType>
  <!-- Portuguese -->

  <fieldType name=&quot;text_pt&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>
  <!-- more aggressive: <filter>
  <!-- most aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Romanian -->

  <fieldType name=&quot;text_ro&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Russian -->

  <fieldType name=&quot;text_ru&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Swedish -->

  <fieldType name=&quot;text_sv&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <!-- less aggressive: <filter>  </analyzer>
  </fieldType>
  <!-- Thai -->

  <fieldType name=&quot;text_th&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Turkish -->

  <fieldType name=&quot;text_tr&quot;>  <analyzer>

  <tokenizer>
  <filter>
  <filter>
  <filter>
  <filter>  </analyzer>
  </fieldType>
  <!-- Similarity is the scoring routine for each document vs. a query.
  A custom Similarity or SimilarityFactory may be specified here, but
  the default is fine for most applications.  
  For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
  -->
  <!--

  <similarity>  <str name=&quot;paramkey&quot;>param value</str>
  </similarity>
  -->
  

  
</schema>
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-425668-1-1.html 上篇帖子: Solr图形化界面banana:除Hue之外的选择 下篇帖子: Solr修复丢失的Index
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表