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/01/09 23:16:17 UTC

phrase slop

I have a ps of 10 set in the config. so for search terms like 'work injury' ,
results that have work and injury within 10 words of one another are coming
up in the first few results which is good. But it also returns results that
have work and injury are more than 10 words apart although they are in page
8 or 9. But i'd like to know if there is a way wherein i could just tell
solr not to return results with the words from search term that are more
than 10 words apart.?
-- 
View this message in context: http://www.nabble.com/phrase-slop-tp14723007p14723007.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: phrase slop

Posted by Mike Klaas <mi...@gmail.com>.
On 9-Jan-08, at 2:16 PM, anuvenk wrote:
>
> I have a ps of 10 set in the config. so for search terms like 'work  
> injury' ,
> results that have work and injury within 10 words of one another  
> are coming
> up in the first few results which is good. But it also returns  
> results that
> have work and injury are more than 10 words apart although they are  
> in page
> 8 or 9. But i'd like to know if there is a way wherein i could just  
> tell
> solr not to return results with the words from search term that are  
> more
> than 10 words apart.?

In trunk, dismax has a 'qs' parameter that is the slop for phrase  
queries in the main query (seems not documented on the wiki).  So

qt=dismax
q="work injury"
qs=10

should do the trick.

-Mike