Re: Function query to boost scores by a constant if all terms are present

2010-08-18 Thread Jan Høydahl / Cominvent
You can use the map() function for this, see http://wiki.apache.org/solr/FunctionQuery#map q=a fox&defType=dismax&qf=allfields&bf=map(query($qq),0,0,0,100.0)&qq=allfields:(quick AND brown AND fence) This adds a constant boost of 100.0 if the $qq field returns a non-zero score, which it does w

Re: Function query to boost scores by a constant if all terms are present

2010-08-17 Thread Ahmet Arslan
> Most of the time, items that match all three terms will > float to the top by > normal ranking, but sometimes there are only two terms that > are like a rash > across the record, and they end up with a higher score than > some items that > match all three query terms. > > I'd like to boost items

Function query to boost scores by a constant if all terms are present

2010-08-17 Thread Bill Dueber
Let me describe what I'm trying to accomplish, first, since what I think is the solution is almost always wrong. :-) I'm doing dismax queries with mm set such that not all terms need to match, e.g. only 2 of 3 query terms need to match. Most of the time, items that match all three terms will floa