solrconfig_extra.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!-- Spell Check
  2. The spell check component can return a list of alternative spelling
  3. suggestions.
  4. http://wiki.apache.org/solr/SpellCheckComponent
  5. -->
  6. <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  7. <str name="queryAnalyzerFieldType">textSpell</str>
  8. <!-- Multiple "Spell Checkers" can be declared and used by this
  9. component
  10. -->
  11. <!-- a spellchecker built from a field of the main index, and
  12. written to disk
  13. -->
  14. <lst name="spellchecker">
  15. <str name="name">default</str>
  16. <str name="field">spell</str>
  17. <str name="spellcheckIndexDir">spellchecker</str>
  18. <str name="buildOnOptimize">true</str>
  19. <!-- uncomment this to require terms to occur in 1% of the documents in order to be included in the dictionary
  20. <float name="thresholdTokenFrequency">.01</float>
  21. -->
  22. </lst>
  23. <!--
  24. Adding German spellhecker index to our Solr index
  25. This also requires to enable the content in schema_extra_types.xml and schema_extra_fields.xml
  26. -->
  27. <!--
  28. <lst name="spellchecker">
  29. <str name="name">spellchecker_de</str>
  30. <str name="field">spell_de</str>
  31. <str name="spellcheckIndexDir">./spellchecker_de</str>
  32. <str name="buildOnOptimize">true</str>
  33. </lst>
  34. -->
  35. <!-- a spellchecker that uses a different distance measure -->
  36. <!--
  37. <lst name="spellchecker">
  38. <str name="name">jarowinkler</str>
  39. <str name="field">spell</str>
  40. <str name="distanceMeasure">
  41. org.apache.lucene.search.spell.JaroWinklerDistance
  42. </str>
  43. <str name="spellcheckIndexDir">spellcheckerJaro</str>
  44. </lst>
  45. -->
  46. <!-- a spellchecker that use an alternate comparator
  47. comparatorClass be one of:
  48. 1. score (default)
  49. 2. freq (Frequency first, then score)
  50. 3. A fully qualified class name
  51. -->
  52. <!--
  53. <lst name="spellchecker">
  54. <str name="name">freq</str>
  55. <str name="field">lowerfilt</str>
  56. <str name="spellcheckIndexDir">spellcheckerFreq</str>
  57. <str name="comparatorClass">freq</str>
  58. <str name="buildOnCommit">true</str>
  59. -->
  60. <!-- A spellchecker that reads the list of words from a file -->
  61. <!--
  62. <lst name="spellchecker">
  63. <str name="classname">solr.FileBasedSpellChecker</str>
  64. <str name="name">file</str>
  65. <str name="sourceLocation">spellings.txt</str>
  66. <str name="characterEncoding">UTF-8</str>
  67. <str name="spellcheckIndexDir">spellcheckerFile</str>
  68. </lst>
  69. -->
  70. </searchComponent>