You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Lou Sacco (JIRA)" <ji...@apache.org> on 2009/12/03 01:53:20 UTC

[jira] Created: (SOLR-1616) JSON Response for Facets not properly formatted

JSON Response for Facets not properly formatted
-----------------------------------------------

                 Key: SOLR-1616
                 URL: https://issues.apache.org/jira/browse/SOLR-1616
             Project: Solr
          Issue Type: Bug
    Affects Versions: 1.4
            Reporter: Lou Sacco


When making a SOLR search call with facets turned on, I notice that the facets JSON string is not properly formatted using wt=json. 

I would expect that there would be a bracketed array around each record rather than running them all together.  This is very hard to read with ExtJS as its JsonReader reads each element as its own record when the paired records are meant to be together.

Here's an example of the output I get:

{code}
"facet_counts":{
 "facet_queries":{},
 "facet_fields":{
    "deviceName":[
     "x2",6,
     "dd22",12,
     "f12",1],
    "devicePrgMgr":[
     "alberto",80,
     "anando",24,
     "artus",101],
    "portfolioName":[
     "zztop",32],
    "chipsetName":[
     "fat",3,
     "thin",2],
{code}

As an example, I would expect chipset family to be so that the JsonReader can read each as record:
{code}
    "chipsetName":[
        ["fat",3],
        ["thin",2]
     ],
{code}

See [here|http://json.org/fatfree.html] for details on Json Arrays. 

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


[jira] Commented: (SOLR-1616) JSON Response for Facets not properly formatted

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785126#action_12785126 ] 

Yonik Seeley commented on SOLR-1616:
------------------------------------

The reason why arrays or maps are not used by default for a named list that needs to maintain order is that it would significantly bloat the response when unserialized for many clients (an extra object per name/value pair).

> JSON Response for Facets not properly formatted
> -----------------------------------------------
>
>                 Key: SOLR-1616
>                 URL: https://issues.apache.org/jira/browse/SOLR-1616
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Lou Sacco
>
> When making a SOLR search call with facets turned on, I notice that the facets JSON string is not properly formatted using wt=json. 
> I would expect that there would be a bracketed array around each record rather than running them all together.  This is very hard to read with ExtJS as its JsonReader reads each element as its own record when the paired records are meant to be together.
> Here's an example of the output I get:
> {code}
> "facet_counts":{
>  "facet_queries":{},
>  "facet_fields":{
>     "deviceName":[
>      "x2",6,
>      "dd22",12,
>      "f12",1],
>     "devicePrgMgr":[
>      "alberto",80,
>      "anando",24,
>      "artus",101],
>     "portfolioName":[
>      "zztop",32],
>     "chipsetName":[
>      "fat",3,
>      "thin",2],
> {code}
> As an example, I would expect chipset family to be so that the JsonReader can read each as record:
> {code}
>     "chipsetName":[
>         ["fat",3],
>         ["thin",2]
>      ],
> {code}
> See [here|http://json.org/fatfree.html] for details on Json Arrays. 

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


[jira] Commented: (SOLR-1616) JSON Response for Facets not properly formatted

Posted by "Lou Sacco (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785120#action_12785120 ] 

Lou Sacco commented on SOLR-1616:
---------------------------------

I should note that after looking at the source code you can use json.nl=arrarr, but I guess I would of expected this to be the default is all.

> JSON Response for Facets not properly formatted
> -----------------------------------------------
>
>                 Key: SOLR-1616
>                 URL: https://issues.apache.org/jira/browse/SOLR-1616
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Lou Sacco
>
> When making a SOLR search call with facets turned on, I notice that the facets JSON string is not properly formatted using wt=json. 
> I would expect that there would be a bracketed array around each record rather than running them all together.  This is very hard to read with ExtJS as its JsonReader reads each element as its own record when the paired records are meant to be together.
> Here's an example of the output I get:
> {code}
> "facet_counts":{
>  "facet_queries":{},
>  "facet_fields":{
>     "deviceName":[
>      "x2",6,
>      "dd22",12,
>      "f12",1],
>     "devicePrgMgr":[
>      "alberto",80,
>      "anando",24,
>      "artus",101],
>     "portfolioName":[
>      "zztop",32],
>     "chipsetName":[
>      "fat",3,
>      "thin",2],
> {code}
> As an example, I would expect chipset family to be so that the JsonReader can read each as record:
> {code}
>     "chipsetName":[
>         ["fat",3],
>         ["thin",2]
>      ],
> {code}
> See [here|http://json.org/fatfree.html] for details on Json Arrays. 

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


[jira] Resolved: (SOLR-1616) JSON Response for Facets not properly formatted

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

Shalin Shekhar Mangar resolved SOLR-1616.
-----------------------------------------

    Resolution: Won't Fix

Closing this per Yonik's comment.

> JSON Response for Facets not properly formatted
> -----------------------------------------------
>
>                 Key: SOLR-1616
>                 URL: https://issues.apache.org/jira/browse/SOLR-1616
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Lou Sacco
>
> When making a SOLR search call with facets turned on, I notice that the facets JSON string is not properly formatted using wt=json. 
> I would expect that there would be a bracketed array around each record rather than running them all together.  This is very hard to read with ExtJS as its JsonReader reads each element as its own record when the paired records are meant to be together.
> Here's an example of the output I get:
> {code}
> "facet_counts":{
>  "facet_queries":{},
>  "facet_fields":{
>     "deviceName":[
>      "x2",6,
>      "dd22",12,
>      "f12",1],
>     "devicePrgMgr":[
>      "alberto",80,
>      "anando",24,
>      "artus",101],
>     "portfolioName":[
>      "zztop",32],
>     "chipsetName":[
>      "fat",3,
>      "thin",2],
> {code}
> As an example, I would expect chipset family to be so that the JsonReader can read each as record:
> {code}
>     "chipsetName":[
>         ["fat",3],
>         ["thin",2]
>      ],
> {code}
> See [here|http://json.org/fatfree.html] for details on Json Arrays. 

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