lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dotan Cohen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-4552) Date ranging with JSON QueryResponseWriter returns array of ints, not array of objects
Date Mon, 11 Mar 2013 06:11:13 GMT

    [ https://issues.apache.org/jira/browse/SOLR-4552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13598567#comment-13598567
] 

Dotan Cohen commented on SOLR-4552:
-----------------------------------

Thank you Stefan. Is there any reason why json.nl=map is not the default? In fact it does
seem to be the 'right' way to translate the XML output to JSON, it is easy to parse, and it
is intuitive.

I've reduced the priority of this issue since there is a workaround, but I would certainly
suggest that the default output format be changed to 'map'. Since it is unexpected behaviour
I still consider this issue a bug.
                
> Date ranging with JSON QueryResponseWriter returns array of ints, not array of objects
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-4552
>                 URL: https://issues.apache.org/jira/browse/SOLR-4552
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 4.0
>         Environment: Debian-based Linux OS, Jetty container, Java 1.7
>            Reporter: Dotan Cohen
>            Priority: Minor
>
> Faceting on a date range with the default XML QueryResponseWriter correctly gives the
following output, which is easily parsable:
> <lst name="counts">
>     <int name="2013-03-01T00:00:00Z">134755</int>
>     <int name="2013-03-02T00:00:00Z">338759</int>
>     <int name="2013-03-03T00:00:00Z">337118</int>
>     <int name="2013-03-04T00:00:00Z">309487</int>
> </lst>
> However, the JSON QueryResponseWriter gives the following output, which conflates the
field names and values and is thus not easily parsable:
> "counts": [
>     "2013-03-01T00:00:00Z",
>     134755,
>     "2013-03-02T00:00:00Z",
>     338754,
>     "2013-03-03T00:00:00Z",
>     337115,
>     "2013-03-04T00:00:00Z",
>     309482,
> ]
> I would expect the JSON QueryResponseWriter to give the following output, which is consistent
with the XML QueryResponseWriter and is easily parsable:
> "counts": [
>     {"2013-03-01T00:00:00Z":134755},
>     {"2013-03-02T00:00:00Z":338754},
>     {"2013-03-03T00:00:00Z":337115},
>     {"2013-03-04T00:00:00Z":309482},
> ]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message