[
https://issues.apache.org/jira/browse/SOLR-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13176271#comment-13176271
]
Hoss Man commented on SOLR-2984:
--------------------------------
There is no such thing as a "null value" in a Solr index. Documents either
have a value, or they do not have a value. If documents do not have a value,
then as documented...
https://wiki.apache.org/solr/FunctionQuery#fieldvalue
"0 is returned for documents without a value in the field"
Assuming that is the situation you are encountering (documents w/o a value)
then based on the example sort you've provided the sort value for those
documents would be product(recip(ms(NOW/HOUR,Date),3.16e-11,1,1),0.04).
If this is not an accurate description of your problem, please post to the
mailing list with more details -- just providing the sort param is not enough
information, we also need to see sample data, the order documents are being
returned, and the expected order documents should have been returned -- ideally
by either using the function to produce the score for each doc, or using the
psuedo-fields to show what the final result of the function is independent of
the score
> Function query does not work when the value of function parameter has null.
> ---------------------------------------------------------------------------
>
> Key: SOLR-2984
> URL: https://issues.apache.org/jira/browse/SOLR-2984
> Project: Solr
> Issue Type: Bug
> Components: SearchComponents - other
> Affects Versions: 3.3
> Reporter: Pradeep
> Priority: Minor
>
> To reproduce,
> sort parameter in query looks like
> sort=sum(product(Rating,0.01),product(recip(ms(NOW/HOUR,Date),3.16e-11,1,1),0.04))
> desc
> and if Rating column in the database has null values, results are not sorted
> according to the output value of the function.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]