This one worked.
if(termfreq(Source,'A'),sum(Likes,3),if(termfreq(Source,'B'),sum(Likes,3),0))
--
View this message in context:
http://lucene.472066.n3.nabble.com/Conditions-in-Boost-function-query-tp4179687p4179906.html
Sent from the Solr - User mailing list archive at Nabble.com.
Nest them perhaps?
Best
Erick
On Wed, Jan 14, 2015 at 7:07 PM, shamik wrote:
> Thanks Eric, I did take a look at the "if" condition earlier, but not sure
> how that can be used for multiple conditions. It works for a single
> condition :
>
> if(termfreq(Source2,'A'),sum(Likes,3),0)
>
> But for
Thanks Eric, I did take a look at the "if" condition earlier, but not sure
how that can be used for multiple conditions. It works for a single
condition :
if(termfreq(Source2,'A'),sum(Likes,3),0)
But for multiple, I'm struggling to find the right syntax. I tried using OR
in conjunction but hasn'
Why won't the "if" clause work? See:
https://cwiki.apache.org/confluence/display/solr/Function+Queries
On Wed, Jan 14, 2015 at 5:29 PM, Shamik Bandopadhyay wrote:
> Hi,
>
>Just wanted to know if it's possible to provide conditions with a
> function query. Right now,I'm using the following fun
Hi,
Just wanted to know if it's possible to provide conditions with a
function query. Right now,I'm using the following functions to boost on
Likes data.
bf=recip(ms(NOW/DAY,PublishDate),3.16e-11,1,1)^2.0 sum(Likes,2)
What I would like to do is to apply the boost on "Likes" based on source.
F