You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Matt Mitchell <go...@gmail.com> on 2008/10/09 15:38:54 UTC
populating a spellcheck dictionary
I'm starting to implement the new SpellCheckComponent. The solr 1.3 dist
example is using a file based dictionary, but I'd like to figure out the
best way to populate the dictionary from our index. Should the spellcheck
field be multivalued?
Thanks,
Matt
Re: populating a spellcheck dictionary
Posted by Matt Mitchell <go...@gmail.com>.
Woops, I was looking at the wrong example solrconfig.xml
Thanks Grant!
Matt
On Thu, Oct 9, 2008 at 10:01 AM, Grant Ingersoll <gs...@apache.org>wrote:
> The example in example/solr/conf/solrconfig.xml should show a couple of
> different options:
>
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>
> <str name="queryAnalyzerFieldType">textSpell</str>
>
> <lst name="spellchecker">
> <str name="name">default</str>
> <str name="field">spell</str>
> <str name="spellcheckIndexDir">./spellchecker1</str>
>
> </lst>
> <lst name="spellchecker">
> <str name="name">jarowinkler</str>
> <str name="field">spell</str>
> <!-- Use a different Distance Measure -->
> <str
> name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
> <str name="spellcheckIndexDir">./spellchecker2</str>
>
> </lst>
>
> <lst name="spellchecker">
> <str name="classname">solr.FileBasedSpellChecker</str>
> <str name="name">file</str>
> <str name="sourceLocation">spellings.txt</str>
> <str name="characterEncoding">UTF-8</str>
> <str name="spellcheckIndexDir">./spellcheckerFile</str>
> </lst>
> </searchComponent>
>
> The first two are index based.
>
> The spell field for the example is:
> <field name="spell" type="textSpell" indexed="true" stored="true"
> multiValued="true"/>
>
> HTH,
> Grant
>
>
> On Oct 9, 2008, at 9:38 AM, Matt Mitchell wrote:
>
> I'm starting to implement the new SpellCheckComponent. The solr 1.3 dist
>> example is using a file based dictionary, but I'd like to figure out the
>> best way to populate the dictionary from our index. Should the spellcheck
>> field be multivalued?
>>
>> Thanks,
>> Matt
>>
>
> --------------------------
> Grant Ingersoll
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
>
>
>
Re: populating a spellcheck dictionary
Posted by Grant Ingersoll <gs...@apache.org>.
The example in example/solr/conf/solrconfig.xml should show a couple
of different options:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">spell</str>
<str name="spellcheckIndexDir">./spellchecker1</str>
</lst>
<lst name="spellchecker">
<str name="name">jarowinkler</str>
<str name="field">spell</str>
<!-- Use a different Distance Measure -->
<str
name
="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</
str>
<str name="spellcheckIndexDir">./spellchecker2</str>
</lst>
<lst name="spellchecker">
<str name="classname">solr.FileBasedSpellChecker</str>
<str name="name">file</str>
<str name="sourceLocation">spellings.txt</str>
<str name="characterEncoding">UTF-8</str>
<str name="spellcheckIndexDir">./spellcheckerFile</str>
</lst>
</searchComponent>
The first two are index based.
The spell field for the example is:
<field name="spell" type="textSpell" indexed="true" stored="true"
multiValued="true"/>
HTH,
Grant
On Oct 9, 2008, at 9:38 AM, Matt Mitchell wrote:
> I'm starting to implement the new SpellCheckComponent. The solr 1.3
> dist
> example is using a file based dictionary, but I'd like to figure out
> the
> best way to populate the dictionary from our index. Should the
> spellcheck
> field be multivalued?
>
> Thanks,
> Matt
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ