[jira] [Updated] (SOLR-7845) 2 arg "query()" does not exist for all docs, even though second arg specifies a default value
[ https://issues.apache.org/jira/browse/SOLR-7845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Munendra S N updated SOLR-7845: --- Attachment: SOLR-7845.patch > 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, 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7845) 2 arg "query()" does not exist for all docs, even though second arg specifies a default value
[ https://issues.apache.org/jira/browse/SOLR-7845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Munendra S N updated SOLR-7845: --- Status: Patch Available (was: Reopened) > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7845) 2 arg "query()" does not exist for all docs, even though second arg specifies a default value
[ https://issues.apache.org/jira/browse/SOLR-7845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Munendra S N updated SOLR-7845: --- Attachment: SOLR-7845.patch > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-7845) 2 arg query() does not exist for all docs, even though second arg specifies a default value
[ https://issues.apache.org/jira/browse/SOLR-7845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hoss Man updated SOLR-7845: --- Description: 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)}} was: sum(0,query()) used to treat the NULL values in query as 0. It stopped working in SOLR 5. Do we want to fix this? {noformat} http://localhost:8983/solr/select?hqval1=pwid:2q=*:*fl=pwid,$yy=sum(0,query({!lucene%20v=$hqval1})) {noformat} Summary: 2 arg query() does not exist for all docs, even though second arg specifies a default value (was: sum should treat NULL as 0) revised summary description to match underlying problem Bill encountered. Easy to reproduce using the techproducts example data with a request like so... http://localhost:8983/solr/techproducts/select?x=id:USDq=cat:currencyq1=query%28$x%29q2=query%28$x,0%29fl=id,exists%28$q1%29,exists%28$q2%29,$q1,$q2,def%28$q1,0%29,exists%28def%28$q1,0%29%29 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 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 (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org