Nicholas,

Also consider that some misspellings are better handled through Synonyms (or 
injected metadata).  

You can garner a great deal of value out of the spell checker by following the 
great advice James is giving hereā€¦but you'll find a well-placed "helper" 
synonym or metavalue can often save a lot of headache and time.

Jason

On May 10, 2013, at 7:32 AM, "Dyer, James" <james.d...@ingramcontent.com> wrote:

> Nicholas,
> 
> It sounds like you might want to use WordBreakSolrSpellChecker, which gets 
> obscure mention in the wiki.  Read through this section: 
> http://wiki.apache.org/solr/SpellCheckComponent#Configuration and you will 
> see some information.  
> 
> Also, the Solr Example shows how to configure this.  See 
> http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/solrconfig.xml
> 
> Look for...
> 
> <lst name="spellchecker">
>  <str name="name">wordbreak</str>
>  ...
> </lst>
> 
> ...and...
> 
> <requestHandler name="/spell" ...>
> ...
> </requestHandler>
> 
> Also, I'd recommend you take a look at each parameter in the "/spell" request 
> handler and read its section on the "spellcheckcomponent" wiki page.  You 
> probably will want to set many of these parameters as well.
> 
> You can get a query to return only spell results simply by specifying 
> "rows=0".  However, its one less query to just have it return the results 
> also.  If there are no results, your application can check for collations and 
> re-issue a collation query.  If there are both results and collations 
> returned, you can give the user results with "did-you-mean" suggestions.
> 
> James Dyer
> Ingram Content Group
> (615) 213-4311
> 
> 
> -----Original Message-----
> From: Nicholas Ding [mailto:nicholas...@gmail.com] 
> Sent: Friday, May 10, 2013 8:47 AM
> To: solr-user@lucene.apache.org
> Subject: Looking for Best Practice of Spellchecker
> 
> Hi guys,
> 
> I'm working on a local search project, I wanna integrate spellchecker for
> the search.
> 
> So basically, my search engines is used to search local businesses. For
> example, user could search for "wall mart", here is a typo, I wanna
> spellchecker to give me Collation for "walmart".
> 
> My problems are:
> 1. I use DirectSolrSpellChecker on my BusinessNameField and pass "wall
> mart" as phrase search, but I can't get collation from the spellchecker.
> 2. I tried not to pass phrase search, but pass q=Wall AND Mart to force a
> 100% match, but spellchecker can't give me collation also.
> 
> I read the documents about spellchecker on Solr wiki, but it's very brief.
> I'm wondering is there any best practice of spellchecker, I believe it's
> widely used in the search, right?
> 
> And I have another idea, I don't know whether it's valid or not. I want to
> apply spellchecker everything before doing the search, so that I could rely
> on the spellchecker to tell me whether my search could get result or not.
> 
> Thanks
> Nicholas
> 

Reply via email to