[
https://issues.apache.org/jira/browse/SOLR-7845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16880483#comment-16880483
]
Munendra S N commented on SOLR-7845:
------------------------------------
[^SOLR-7845.patch]
This is happening because objectValue returns null when doc doesn't match.
Corrected this to return defVal.
objectVal(doc) could just call floatVal(doc) but haven't made this change.
> 2 arg "query()" does not exist for all docs, even though second arg specifies
> a default value
> ---------------------------------------------------------------------------------------------
>
> Key: SOLR-7845
> URL: https://issues.apache.org/jira/browse/SOLR-7845
> Project: Solr
> Issue Type: Bug
> Reporter: Bill Bell
> Priority: Major
> Attachments: SOLR-7845.patch
>
>
> The 2 arg version of the "query()" was designed so that the second argument
> would specify the value used for any document that does not match the query
> pecified by the first argument -- but the "exists" property of the resulting
> ValueSource only takes into consideration wether or not the document matches
> the query -- and ignores the use of the second argument.
> ----
> The work around is to ignore the 2 arg form of the query() function, and
> instead wrap he query function in def().
> for example: {{def(query($something), $defaultval)}} instead of
> {{query($something, $defaultval)}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]