[
https://issues.apache.org/jira/browse/SOLR-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated SOLR-6540:
---------------------------
Attachment: SOLR-6540.patch
bq. But the question remains as to what floatVal() should return if/when it is
called in this situation? Infinity? NaN? 0.0F?
based on the existing StringDistnace contract, the choice i went with...
{noformat}
// if a ValueSource is missing, it is maximally distant from every other
// value source *except* for another missing value source
// ie: strdist(null,null)==1 but strdist(null,anything)==0
{noformat}
So the {{exists()}} method on the {{strdist()}} value source returns false if
the {{exists()}} method on either of hte sub-valuesources returns false -- but
in cases where a number is asked for anyway (ie: query score context) then 0,
unless both are missing in which case they are identical and hte number is 1.
new tests pass, previously commented out bits of StatsComponentTest passes ...
still running full test sweet but i think this is good to go.
> strdist() causes NPE if doc is missing field
> --------------------------------------------
>
> Key: SOLR-6540
> URL: https://issues.apache.org/jira/browse/SOLR-6540
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: SOLR-6540.patch
>
>
> If you try to use the strdist function on a field which is missing in some
> docs, you'll get a NullPointerException
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]