You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Johannes Goll (JIRA)" <ji...@apache.org> on 2010/12/23 16:03:26 UTC

[jira] Created: (SOLR-2295) stats component | mal-formatted json response

stats component | mal-formatted json response
---------------------------------------------

                 Key: SOLR-2295
                 URL: https://issues.apache.org/jira/browse/SOLR-2295
             Project: Solr
          Issue Type: Bug
    Affects Versions: 1.4.1
            Reporter: Johannes Goll


I am getting a mal-formatted json response when using the
stats component with a facet that returns a stddev value of NaN ,e.g

                  "facet-1":{

                     "min":0.0604898,

                     "max":0.0604898,

                     "sum":1.209796,

                     "count":20,

                     "missing":0,

                     "sumOfSquares":0.0731803180808,

                     "mean":0.0604898,

                     "stddev":NaN

                  },
I have submitted my complete response to

http://jsonformatter.curiousconcept.com

and got the following exception:

Warning:Invalid quotes on string for the line with  "stddev":NaN
The Solr response broke my PHP code; replacing "NaN" with 0.0 solved the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2295) stats component | mal-formatted json response

Posted by "Johannes Goll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974635#action_12974635 ] 

Johannes Goll commented on SOLR-2295:
-------------------------------------

from Chris Hostetter

: I am getting a mal-formatted json response when using the
: stats component with a facet that returns a stddev value of NaN ,e.g

I'm not a JSON expert, but i suspect NaN just isn't legal JSON, and the
JSON response writer has a bug.

quick google search...
http://stackoverflow.com/questions/1423081/json-left-out-infinity-and-nan-json-status-in-ecmascript
...suggests that the only valid value is "null"

please file a bug.

-Hoss

> stats component | mal-formatted json response
> ---------------------------------------------
>
>                 Key: SOLR-2295
>                 URL: https://issues.apache.org/jira/browse/SOLR-2295
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4.1
>            Reporter: Johannes Goll
>
> I am getting a mal-formatted json response when using the
> stats component with a facet that returns a stddev value of NaN ,e.g
>                   "facet-1":{
>                      "min":0.0604898,
>                      "max":0.0604898,
>                      "sum":1.209796,
>                      "count":20,
>                      "missing":0,
>                      "sumOfSquares":0.0731803180808,
>                      "mean":0.0604898,
>                      "stddev":NaN
>                   },
> I have submitted my complete response to
> http://jsonformatter.curiousconcept.com
> and got the following exception:
> Warning:Invalid quotes on string for the line with  "stddev":NaN
> The Solr response broke my PHP code; replacing "NaN" with 0.0 solved the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Resolved: (SOLR-2295) stats component | mal-formatted json response

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2295.
----------------------------

    Resolution: Duplicate

This seems to be a dup of SOLR-1914 -- although until about 5 minutes ago, it had a horribly confusing summary, so it's no wonder no one noticed before)

biofox: if you can reproduce using either 3x or trunk from svn, please feel free to reopen with more details

> stats component | mal-formatted json response
> ---------------------------------------------
>
>                 Key: SOLR-2295
>                 URL: https://issues.apache.org/jira/browse/SOLR-2295
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4.1
>            Reporter: biofox
>
> I am getting a mal-formatted json response when using the
> stats component with a facet that returns a stddev value of NaN ,e.g
>                   "facet-1":{
>                      "min":0.0604898,
>                      "max":0.0604898,
>                      "sum":1.209796,
>                      "count":20,
>                      "missing":0,
>                      "sumOfSquares":0.0731803180808,
>                      "mean":0.0604898,
>                      "stddev":NaN
>                   },
> I have submitted my complete response to
> http://jsonformatter.curiousconcept.com
> and got the following exception:
> Warning:Invalid quotes on string for the line with  "stddev":NaN
> The Solr response broke my PHP code; replacing "NaN" with 0.0 solved the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org