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 satya swaroop <ss...@gmail.com> on 2010/07/26 15:56:13 UTC
spell checking....
hi all,
i am a new one to solr and able to implement indexing the documents
by following the solr wiki. now i am trying to add the spellchecking. i
followed the spellcheck component in wiki but not getting the suggested
spellings. i first build it by spellcheck.build=true,...
here i give u the example:::::::
http://localhost:8080/solr/spell?q=javs&spellcheck=true&spellcheck.collate=true
<response>
----
-----
</result>
<lst name="spellcheck">
<lst name="suggestions"/>
</lst>
</response>
here the response should actualy suggest the "java" but didnt......
can any one guide me about it...
i am using solr 1.4, tomcat in ubuntu
Regards,
swarup
Re: spell checking....
Posted by satya swaroop <ss...@gmail.com>.
This is in solrconfig.xml:::::::::::
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<lst name="spellchecker">
<str name="name">default</str>
<str name="classname">solr.IndexBasedSpellChecker</str>
<str name="field">spell</str>
<str name="spellcheckIndexDir">./spellchecker</str>
<str name="accuracy">0.7</str>
<str name="buildOnCommit">true</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">jarowinkler</str>
<str name="field">lowerfilt</str>
<str
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
<str name="spellcheckIndexDir">./spellchecker</str>
<str name="buildOnCommit">true</str>
<str name="buildOnOptimize">true</str>
</lst>
<str name="queryAnalyzerFieldType">textSpell</str>
</searchComponent>
<!--
The SpellingQueryConverter to convert raw (CommonParams.Q) queries into
tokens. Uses a simple regular expression
to strip off field markup, boosts, ranges, etc. but it is not guaranteed
to match an exact parse from the query parser.
Optional, defaults to solr.SpellingQueryConverter
-->
<queryConverter name="queryConverter"
class="org.apache.solr.spelling.SpellingQueryConverter"/>
********************************************************************************
i added the following in standard request handler::::::::::
<requestHandler name="standard" class="solr.SearchHandler" default="true">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<!--
<int name="rows">10</int>
<str name="fl">*</str>
<str name="version">2.1</str>
<!-- Optional, must match spell checker's name as defined above,
defaults to "default" -->
<str name="spellcheck.dictionary">default</str>
<!-- omp = Only More Popular -->
<str name="spellcheck.onlyMorePopular">false</str>
<!-- exr = Extended Results -->
<str name="spellcheck.extendedResults">false</str>
<!-- The number of suggestions to return -->
<str name="spellcheck.count">1</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
Re: spell checking....
Posted by Erick Erickson <er...@gmail.com>.
It's almost impossible to analyze this kind of thing without seeing your
schema and debug output. You might want to review:
http://wiki.apache.org/solr/UsingMailingLists
Best
Erick
On Mon, Jul 26, 2010 at 9:56 AM, satya swaroop <ss...@gmail.com> wrote:
> hi all,
> i am a new one to solr and able to implement indexing the documents
> by following the solr wiki. now i am trying to add the spellchecking. i
> followed the spellcheck component in wiki but not getting the suggested
> spellings. i first build it by spellcheck.build=true,...
>
> here i give u the example:::::::
>
>
> http://localhost:8080/solr/spell?q=javs&spellcheck=true&spellcheck.collate=true
>
> <response>
> ----
> -----
> </result>
>
> <lst name="spellcheck">
> <lst name="suggestions"/>
> </lst>
> </response>
>
>
> here the response should actualy suggest the "java" but didnt......
>
> can any one guide me about it...
> i am using solr 1.4, tomcat in ubuntu
>
>
>
>
>
> Regards,
> swarup
>