The "exists" function returns a boolean - which you can use in an "if"
function:
if(exists(query(field:value)),recip(ms(NOW,data),3.16e-11,1,1),0)
See:
http://wiki.apache.org/solr/FunctionQuery#exists
-- Jack Krupansky
-----Original Message-----
From: Alessandro Benedetti
Sent: Friday, October 26, 2012 8:37 AM
To: solr-user@lucene.apache.org
Subject: Re: [Solr boost] Date boost for certain query set
I've made some steps ahead.
I'm writing a function to this sort of clustered boosting:
<str
name="bf">product(recip(ms(NOW,data),3.16e-11,1,1),exists(query(field:value)))</str>
I multiply the boost, for a specific value of some field, the exists
function will return 0 or 1, and this would cancel or use the date boost.
But this function I wrote , has a wrong sintax, I need to correct the
"exists" part.
Any hint?
2012/10/26 Alessandro Benedetti <a.benede...@sourcesense.com>
Hi guys,
I was fighting with boost factor in my edismax request handler :
<lst name="appends">
<str name="defType">edismax</str>
<str name="bq">(idente:2)^0.1</str>
<str name="bf">recip(ms(NOW,data),3.16e-11,1,1)</str>
</lst>
I'm playing with bq( boost query) and bf (boost function).
Is it possible to catenate bq and bf in certain manners?
For example :
I want that when <bq1> matches, <bf1> will start to effect this document,
and I want that when <bq2> matches, <bf2> will start to effect this
document.
Of course in cumulative way.
Is possibile to associate bq and bf in the previous way?
In simple words I want a bq to activate specific bf.
Cheers
--
-------------------------------
Alessandro Benedetti
Sourcesense - making sense of Open Source: http://www.sourcesense.com
--
-------------------------------
Alessandro Benedetti
Sourcesense - making sense of Open Source: http://www.sourcesense.com