Charles Draper created SOLR-8264:
------------------------------------

             Summary: Date boosting losing to constant value in min function 
when date value is null
                 Key: SOLR-8264
                 URL: https://issues.apache.org/jira/browse/SOLR-8264
             Project: Solr
          Issue Type: Bug
    Affects Versions: 5.3
            Reporter: Charles Draper
            Priority: Minor


I am following https://wiki.apache.org/solr/FunctionQuery#Date_Boosting for 
date boosting. This works great except when the date field is non-existent and 
I attempt to set a maximum value. As I understand it, a non-existent date field 
will default to the start of the epoch for functions. And so the following 
boost works even though date_s doesn't exist for the particular record:

{code}
recip(ms(NOW/YEAR,date_s),3.16e-11,1,1)
0.021798734 = 
1.0/(3.16E-11*float(ms(const(1420070400000),date(date_s)=null))+1.0)
{code}

However, when I try to apply a min function, the constant value is always 
selected whether it is greater or less than the recip calculation: 

{code}
min(1,recip(ms(NOW/YEAR,date_s),3.16e-11,1,1))
1.0 = 
min(const(1),1.0/(3.16E-11*float(ms(const(1420070400000),date(date_s)=null))+1.0))
{code}

I am currently getting around the issue by supplying a default value for the 
field in my schema.xml.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to