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 meghana <me...@amultek.com> on 2011/11/23 08:03:23 UTC

Solr Search for misspelled search term

Hi all,

I need to find a way by which solr check and return for results for
misspelled search term. 
Do anybody have any idea? 

Thank You!!
Meghana

--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-for-misspelled-search-term-tp3529961p3529961.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Search for misspelled search term

Posted by Erick Erickson <er...@gmail.com>.
Did you turn it on? In the defaults section, something like:
<str name="spellcheck">on</str>

BTW, I would NOT do the spellcheck.build=true on every
request, this will rebuild your dictionary every time which
is a definite performance problem!

Best
Erick

On Wed, Nov 23, 2011 at 7:32 AM, meghana <me...@amultek.com> wrote:
>
> I have configured specllchecker component in my solrconfig
> below is the configuration
>
> <requestHandler name="/spellcheck" class="solr.SearchHandler" lazy="true">
>    <lst name="defaults">
>
>      <str name="spellcheck.onlyMorePopular">false</str>
>
>      <str name="spellcheck.extendedResults">false</str>
>
>      <str name="spellcheck.count">1</str>
>    </lst>
>    <arr name="last-components">
>      <str>spellcheck</str>
>    </arr>
>  </requestHandler>
>
> using above configuration it works with below url
> http://192.168.1.59:8080/solr/core0/spellcheck?q=sc:directry&spellcheck=true&spellcheck.build=true
>
> But when i set the same config in my standard request handler then i dont
> work,
> below is config setting for that
>
>  <requestHandler name="standard" class="solr.SearchHandler" default="true">
>
>     <lst name="defaults">
>       <str name="echoParams">explicit</str>
>
>      <str name="spellcheck.onlyMorePopular">false</str>
>
>      <str name="spellcheck.extendedResults">false</str>
>
>      <str name="spellcheck.count">1</str>
>     </lst>
>  <arr name="last-components">
>      <str>spellcheck</str>
>    </arr>
>  </requestHandler>
>
> then its not working with below url
> http://192.168.1.59:8080/solr/core0/select?q=sc:directry&spellcheck=true&spellcheck.build=true.
>
> anybody have any idea?
> neuron005 wrote
>>
>> Do you mean stemming?
>> For misspelled  words you will have to edit your dictionary
>> (stopwords.txt) i think where you can set solution for misspelled words!
>> Hope So :)
>>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-for-misspelled-search-term-tp3529961p3530526.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr Search for misspelled search term

Posted by meghana <me...@amultek.com>.
I have configured specllchecker component in my solrconfig
below is the configuration

<requestHandler name="/spellcheck" class="solr.SearchHandler" lazy="true">
    <lst name="defaults">
      
      <str name="spellcheck.onlyMorePopular">false</str>
      
      <str name="spellcheck.extendedResults">false</str>
      
      <str name="spellcheck.count">1</str>
    </lst>
    <arr name="last-components">
      <str>spellcheck</str>
    </arr>
  </requestHandler>

using above configuration it works with below url 
http://192.168.1.59:8080/solr/core0/spellcheck?q=sc:directry&spellcheck=true&spellcheck.build=true

But when i set the same config in my standard request handler then i dont
work,
below is config setting for that

  <requestHandler name="standard" class="solr.SearchHandler" default="true">
    
     <lst name="defaults">
       <str name="echoParams">explicit</str>
       
      <str name="spellcheck.onlyMorePopular">false</str>
      
      <str name="spellcheck.extendedResults">false</str>
      
      <str name="spellcheck.count">1</str> 
     </lst>
  <arr name="last-components">
      <str>spellcheck</str>
    </arr>
  </requestHandler>

then its not working with below url
http://192.168.1.59:8080/solr/core0/select?q=sc:directry&spellcheck=true&spellcheck.build=true.

anybody have any idea?
neuron005 wrote
> 
> Do you mean stemming?
> For misspelled  words you will have to edit your dictionary
> (stopwords.txt) i think where you can set solution for misspelled words!
> Hope So :)
> 


--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-for-misspelled-search-term-tp3529961p3530526.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Search for misspelled search term

Posted by neuron005 <ne...@gmail.com>.
Do you mean stemming?
For misspelled  words you will have to edit your dictionary (stopwords.txt)
i think where you can set solution for misspelled words!
Hope So :)

--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Search-for-misspelled-search-term-tp3529961p3530504.html
Sent from the Solr - User mailing list archive at Nabble.com.