edismax bq, ignore tf/idf?
Hi- I am trying to add a setting that will boost results based on existence in different buckets. Using edismax, I added the bq parameter: location:A^5 location:B^3 I want this to put everything in location A above everything in location B. This mostly works, BUT depending on the number of matches for each location, location:B can get a higher final score. Is there a way to ignore tf/idf when boosting this location? location from a field type: class=solr.StrField omitNorms=true Thanks for any pointers! ryan
Re: edismax bq, ignore tf/idf?
How about a boost function, bf or boost? bf=if(exists(query(location:A)),5,if(exists(query(location:B)),3,0)) Use bf if you want to add to the score, boost if you want to multiply the score -- Jack Krupansky -Original Message- From: Ryan McKinley Sent: Friday, October 26, 2012 6:14 PM To: solr-user@lucene.apache.org Subject: edismax bq, ignore tf/idf? Hi- I am trying to add a setting that will boost results based on existence in different buckets. Using edismax, I added the bq parameter: location:A^5 location:B^3 I want this to put everything in location A above everything in location B. This mostly works, BUT depending on the number of matches for each location, location:B can get a higher final score. Is there a way to ignore tf/idf when boosting this location? location from a field type: class=solr.StrField omitNorms=true Thanks for any pointers! ryan
Re: edismax bq, ignore tf/idf?
: How about a boost function, bf or boost? : : bf=if(exists(query(location:A)),5,if(exists(query(location:B)),3,0)) Right ... assuming you only want to ignore tf/idf on these fields in this specifc context, function queries are the way to go -- otherwise you could just use a per-field similarity to ignore tf/idf. I would suggest however that instead of using the exists(query()) consider the tf() function ... bf=if(tf(location,A),5,0)bf=if(tf(location,B),3,0) s/bf/boost/g s/0/1/g if you wnat mutiplicitive boosts. -Hoss
Re: edismax bq, ignore tf/idf?
thanks! On Fri, Oct 26, 2012 at 4:20 PM, Chris Hostetter hossman_luc...@fucit.org wrote: : How about a boost function, bf or boost? : : bf=if(exists(query(location:A)),5,if(exists(query(location:B)),3,0)) Right ... assuming you only want to ignore tf/idf on these fields in this specifc context, function queries are the way to go -- otherwise you could just use a per-field similarity to ignore tf/idf. I would suggest however that instead of using the exists(query()) consider the tf() function ... bf=if(tf(location,A),5,0)bf=if(tf(location,B),3,0) s/bf/boost/g s/0/1/g if you wnat mutiplicitive boosts. -Hoss