lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Some basics
Date Mon, 14 Jun 2010 20:05:11 GMT

: - I want my search to "auto" spell check - that is if someone types
: "restarant" I'd like the system to automatically search for restaurant.
: I've seen the SpellCheckComponent but that doesn't seem to have a simple way
: to automatically do the "near" type comparison.  Is the SpellCheckComponent
: the wrong one or do I just need to manually handle the situation in my
: client code?

at the moment you need to handle this in your client -- if you get no 
results back (or too few results based on some expecatation you have) 
but the spellcheck component retunred a suggestion then trigger a 
subsequent search using that suggestion.

: - Also, what is the proper analyzer if I want to search a search for "thai
: food" or "thai restaurant" to actually match on Thai?  I can't totally
: ignore words like food and restaurant but I want to ignore more general
: terms and look for specific first (or I should say score them higher).

the issue isn't so much your analyzer as how you structure your query -- i 
would suggest using the dismax query parser with a very low value for hte 
'mm' param (ie: '1' or something like '10%' if you expect a lot of queries 
with many many words) and a useful "pf" param -- that way two word queries 
will return matches for either word, but docs that match both words will 
score higher, and docs that match the full phrase will score the highest.


View raw message