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 anuvenk <an...@hotmail.com> on 2008/11/20 18:55:17 UTC

Question about dismax 'mm' - give boost to searches by location

I use the 'dismax handler' for my phrase matching. And i have the 'mm' set
this way:
Up to 3 words, match all
up to 4, match 3
up to 4, match 3 & so on
Its been working fine, but for certain phrases like 'san diego drunk driving
defense attorney', its brings up dui attorneys for other cities first
because the way i've set the 'mm' its trying to match docs with any 4 words
from the search phrase. In such cases how do i make solr return the san
diego listing first. I don't want to make phrase matching stricter either
(i.e don't want to change the current 'mm' configuration)
Any way to solve for this?
-- 
View this message in context: http://www.nabble.com/Question-about-dismax-%27mm%27---give-boost-to-searches-by-location-tp20606730p20606730.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Question about dismax 'mm' - give boost to searches by location

Posted by Chris Hostetter <ho...@fucit.org>.
: of those 4 words. So whats happening is last will and testament from all
: states are returned although user specifically asked for florida will. I
: don't want to alter the 'mm' either because its working fine for other
: searches. Just for the search terms with a 'location' , i want to be able to
: match all words. Any easy way to do this? Someone please?

Solr doesn't really have any way to know when something is a location or 
not ... if you have a specific location field, you can give it a very high 
boost value in the qf, and then (in theory) searches that include words 
which match on a location will score much higher then results in other 
locations.  butthe other way to go would be to preprocess the users query 
string, detect when words look like the name of a location, and remove 
them from the main query and treat them as an "fq" instead.




-Hoss


Re: Question about dismax 'mm' - give boost to searches by location

Posted by anuvenk <an...@hotmail.com>.
Since i didn't receive any response, i think i my question wasn't very clear.
If the phrase has 4 words (last will and testament florida - and will be
removed by stopwordfilter), right now solr matches docs with atleast 3 out
of those 4 words. So whats happening is last will and testament from all
states are returned although user specifically asked for florida will. I
don't want to alter the 'mm' either because its working fine for other
searches. Just for the search terms with a 'location' , i want to be able to
match all words. Any easy way to do this? Someone please?

anuvenk wrote:
> 
> I use the 'dismax handler' for my phrase matching. And i have the 'mm' set
> this way:
> Up to 3 words, match all
> up to 4, match 3
> up to 4, match 3 & so on
> Its been working fine, but for certain phrases like 'san diego drunk
> driving defense attorney', its brings up dui attorneys for other cities
> first because the way i've set the 'mm' its trying to match docs with any
> 4 words from the search phrase. In such cases how do i make solr return
> the san diego listing first. I don't want to make phrase matching stricter
> either (i.e don't want to change the current 'mm' configuration)
> Any way to solve for this?
> 

-- 
View this message in context: http://www.nabble.com/Question-about-dismax-%27mm%27---give-boost-to-searches-by-location-tp20606730p20628404.html
Sent from the Solr - User mailing list archive at Nabble.com.