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