[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-11-20 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13153955#comment-13153955
 ] 

Chris Male commented on SOLR-1123:
--

Committed to trunk in revision 1204327.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
Assignee: Chris Male
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch, 
 SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-11-20 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13153958#comment-13153958
 ] 

Chris Male commented on SOLR-1123:
--

Committed to 3x in revision 1204329.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
Assignee: Chris Male
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch, 
 SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-11-20 Thread Mark Miller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13153962#comment-13153962
 ] 

Mark Miller commented on SOLR-1123:
---

FWIW: we should probably add Uri to changes as well, as he filed the issue.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
Assignee: Chris Male
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch, 
 SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-11-18 Thread Simon Willnauer (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152734#comment-13152734
 ] 

Simon Willnauer commented on SOLR-1123:
---

+1 I will roll a release candidate on monday I didn't finish it this week

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
Assignee: Chris Male
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch, 
 SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-11-17 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152567#comment-13152567
 ] 

Chris Male commented on SOLR-1123:
--

Hey Hoss,

I haven't had a chance to commit it to trunk yet either (it feel between the 
cracks), I'll commit it to both today.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
Assignee: Chris Male
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch, 
 SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-05 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13120715#comment-13120715
 ] 

Chris Male commented on SOLR-1123:
--

As there doesn't seem to be any objections, I plan to commit this shortly.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-05 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13120940#comment-13120940
 ] 

Yonik Seeley commented on SOLR-1123:


Since this is literally the Content-Type header, should we use a parameter name 
like content-type or Content-Type rather than content.type?  Or are there 
other content.foo params that would make scoping them all under content. make 
more sense? 

{code}
+  If you are building applications that consume JSON, just remove
+  this override to get the default application/json mime type.
{code}

This part makes it sound like you need to remove it... but most programmatic 
clients won't care (or will actually work better with text since the charset is 
defined).  Let's change that part to something like:

{code}
If your browser or application expects a MIME type of application/json,
just remove this override.
{code}


 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-03 Thread Uwe Schindler (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119220#comment-13119220
 ] 

Uwe Schindler commented on SOLR-1123:
-

+1

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch, SOLR-1123.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Chris Tucker (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118972#comment-13118972
 ] 

Chris Tucker commented on SOLR-1123:


Is there really such a large use case for users who don't have a JSON plugin 
installed but do need to view JSON results in the browser?  An XML response 
will almost certainly be rendered more readably for those users (in which case 
the JSON point is moot), and if the user does intend to view JSON frequently 
they simply install a JSON plugin: reading JSON as a big lump of text without 
the aid of a plugin is not a manageable solution for most people I know.  
Intentionally returning a known-wrong content type to work around a client 
issue for casual users while causing a much bigger problem (thwarting 
well-behaved clients, JSON plugins, and filters) for users who actually need to 
work with this seems like a poor choice.  I'd argue the default should be 
changed to application/json immediately, and a separate (lower-priority) ticket 
raised to address allowing the user to override the content-type in the 
response if they so desire.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118976#comment-13118976
 ] 

Chris Male commented on SOLR-1123:
--

I agree with Chris wholeheartedly.  

It doesn't seem to be user-friendly to return a content-type that isn't inline 
with the RFC standard and I can't help but feel that the number of users who 
will be negatively impacted by this change will be small.

There's a reason this keeps coming up in discussion.

Chris, can you put together a patch which changes the content-type?

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119025#comment-13119025
 ] 

Yonik Seeley commented on SOLR-1123:


bq. Is there really such a large use case for users who don't have a JSON 
plugin installed but do need to view JSON results in the browser?

JSON has been all the rage for the past number of years - tons of people have 
been programmed to say yuck XML, yay JSON, YAML, etc.
In my experience, very few people have JSON plugins installed, and the 
out-of-the-box experience will be horrible for those people (JSON is even used 
in our beginner tutorial).

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Chris Tucker (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119092#comment-13119092
 ] 

Chris Tucker commented on SOLR-1123:


JSON is certainly popular, and I agree that many users have a visceral reaction 
against XML.  However, we're talking here about maintaining current behavior to 
support one very specific set of users: those who (1) are not committed enough 
to JSON to know how to view it (a plugin, Firebug, or what have you, which they 
will need for *every other case* where they get JSON from any other service out 
there) but (2) are committed enough to it to not be able/willing to use the 
(arguably much better) XML visualization tools built into every browser.  This 
just seems like a very small population of users.  Meanwhile, the current 
behavior thwarts many serious users who *do* want to use a JSON plugin, makes 
it impossible to write content-type aware servlet filters (which was my use 
case way back when), and violates the expectation that a response will have the 
RFC defined content type associated with it.  IMHO the cost vastly outweighs 
the benefit here: if need be, put a note on the wiki in the tutorial where JSON 
is mentioned (which, as far as I can tell, is simply to say hey, you can get 
the results in JSON, too!) pointing people to a browser plugin and be done 
with it.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Uwe Schindler (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119098#comment-13119098
 ] 

Uwe Schindler commented on SOLR-1123:
-

+1 to change the content type to the official one. I was about to do this 
together with another ResponseWriter change once ago... the wrong type is a 
problem for all users actually using browsers with plugins. If Solr would send 
xml without application/xml I would complain, too, as e.g. Internet Explorer 
has the best xml viewer on earth (sorry, FF and Chrome have broken namespace 
prefix support).

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119099#comment-13119099
 ] 

Yonik Seeley commented on SOLR-1123:


The downside for the small minority of users likely to have a browser JSON 
plugin installed is that they will still see a text JSON response.  This is a 
much more graceful fallback, and we can add an optional parameter to change the 
content-type.  It seems pretty clear to me that the default content-type should 
remain as is for the best user experience for the majority of new users.  I 
originally coded the content-type as something with x-json in it (Solr's JSON 
support pre-dates the RFC), but sending a query to solr and being prompted to 
download the reply or search the internet for a plugin is horrible and will 
definitely turn people off.

And don't get me started on the overreaching JSON RFC wrt specifying encodings.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Hoss Man (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119102#comment-13119102
 ] 

Hoss Man commented on SOLR-1123:


Personally i'm a fan of the proposal that was earlier suggested to rethink the 
response writer API so we can add a generalized SolrParam for overriding the 
default Content-Type of *any* response writer, and then letting the example 
specify text/plain as a default to make the tutorial easy to read.

but independent of that (since it's a much bigger issue), why don't we move 
forward by:

* changing the default mime type for the writer to be application/json
* add an init param on the writer to override the mime type used (much like the 
patch does, but i'm not a fan of the proposed param name nor of making it a 
simple boolean)
* update the example solrconfig.xml to explicitly use this init param to set 
the type to text/plain with a comment like so...

{code}
queryResponseWriter name=json class=solr.JSONResponseWriter
  !-- For the purposes of the tutorial, JSON response are written as 
   plain text so that it's easy to read in *any* browser.  
   If you are building applications that consume JSON, just remove
   this override to get the default application/json mime type.
--
  str name=content.typetext/plain/str
/queryResponseWriter
{code}

...which seems like a good compromise all the way around:  The default mime 
type of the writer starts matching the expectations of advanced users, the 
example configs make the tutorial output easy to read for novices in any 
browser, and there is clear indication in those example configs how people can 
change the content type used (crazy people can even use text/json-x if they 
really want to)

objections? 

(If/when we adding a more general request time mime type over ride param, this 
init param can still be used as a fallback, so it doesn't really paint us into 
a corner or anything)


 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-02 Thread Chris Tucker (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13119107#comment-13119107
 ] 

Chris Tucker commented on SOLR-1123:


Sounds awesome.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Ralph (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118874#comment-13118874
 ] 

Ralph commented on SOLR-1123:
-

I agree with Neil, can someone post about a solution.  I tried some of the 
options listed here and none seem to be active.

Thanks,
Ralph

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118956#comment-13118956
 ] 

Chris Male commented on SOLR-1123:
--

I had assumed this had been dealt with.  It seems we should just break 
backwards compat on trunk and change the JSONResponseWriter to return 
application/json.  Why continue to return text?

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118962#comment-13118962
 ] 

Yonik Seeley commented on SOLR-1123:


bq. Why continue to return text?

This was discussed in a different issue (it has come up a number of times 
before).  At the time, returning application/json as the content-type would 
cause all of the major browsers to fail to display the JSON and some would 
prompt to download it and some would prompt to search for an application that 
could handle it.  Using text was much more user friendly.  Clients that are 
talking to solr and send wt=json or wt=xml know exactly what they are going 
to get back anyway.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118961#comment-13118961
 ] 

Yonik Seeley commented on SOLR-1123:


bq. Why continue to return text?

This was discussed in a different issue (it has come up a number of times 
before).  At the time, returning application/json as the content-type would 
cause all of the major browsers to fail to display the JSON and some would 
prompt to download it and some would prompt to search for an application that 
could handle it.  Using text was much more user friendly.  Clients that are 
talking to solr and send wt=json or wt=xml know exactly what they are going 
to get back anyway.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Chris Male (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118964#comment-13118964
 ] 

Chris Male commented on SOLR-1123:
--

Okay, what about today when there are plenty of extensions for the major 
browsers to correctly display JSON?  Do we really need to support users do a 
manual Solr request through their browser and returning JSON? If they want 
that, they can use a text protocol like XML. 

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Ryo Hideno (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118965#comment-13118965
 ] 

Ryo Hideno commented on SOLR-1123:
--

+1

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-10-01 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13118966#comment-13118966
 ] 

Yonik Seeley commented on SOLR-1123:


bq. Okay, what about today when there are plenty of extensions for the major 
browsers to correctly display JSON?

Requiring the user to install an extension to display a response isn't that 
friendly either.
We should think about the number of users who would be inconvenienced (and in 
what manner) using one default vs the other.
The most flexible approach would allow the user to set the content-type, but 
the default should remain what gives the best user experience.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.5, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-09-07 Thread Neil Hooey (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13099577#comment-13099577
 ] 

Neil Hooey commented on SOLR-1123:
--

Can we revive this issue?

Does anyone have a patch for the short-term fix?

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.4, 4.0

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type

2011-05-30 Thread Ingo Renner (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13041308#comment-13041308
 ] 

Ingo Renner commented on SOLR-1123:
---

+1 for the short term fix

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 3.2

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2010-08-30 Thread Chris Tucker (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12904275#action_12904275
 ] 

Chris Tucker commented on SOLR-1123:


I'd like to +1 the short-term fix.  The incorrect content type makes it 
difficult to filter/transform the response in a servlet filter or Jetty 
handler: one has to inspect the wt parameter on the request to establish 
(guess?) that JSON has been requested and is being sent back.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: Next

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

-- 
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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2010-08-26 Thread Lorrin Nelson (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12903015#action_12903015
 ] 

Lorrin Nelson commented on SOLR-1123:
-

I propose treating this as two issues:

A short-term bug fix to properly return JSON data with the standard 
application/json ContentType

A low-priority feature request to allow customizing the JSON writer to return 
non-standard ContentType

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: Next

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

-- 
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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-21 Thread Lance Norskog (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12793424#action_12793424
 ] 

Lance Norskog commented on SOLR-1123:
-

It should be possible to pass an arbitrary set of parameters to a 
ResponseWriter. I added this feature to XSLTResponseWriter in a patch; it made 
it possible to genericize XSL scripts.

[SOLR-1354|https://issues.apache.org/jira/browse/SOLR-1354]

Since 'tr' chooses the XSLT script, I made 'tr.param=x' pass 'param=x' into the 
XSL interpreter. 'tr.mime-type=application/json' would be used by the JSON 
interpreter.

I did not have to change anything outside of XSLTResponseWriter.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-21 Thread Lance Norskog (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12793466#action_12793466
 ] 

Lance Norskog commented on SOLR-1123:
-

Thinking about it again, 'wt' selects the writer, so parameters to the JSON 
writer should be 'wt.param=value'. 'tr' is the transformer script, and 
'tr.param=value' should pass data through to the transformer code. So, to 
handle this problem I would use 'wt=jsonwt.mime-type=application/json'.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-13 Thread Noble Paul (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789912#action_12789912
 ] 

Noble Paul commented on SOLR-1123:
--

Should we make responsewriters use the GenericTextResponseWriter SOLR-1516?

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-13 Thread Yonik Seeley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789915#action_12789915
 ] 

Yonik Seeley commented on SOLR-1123:


I never got a chance to check out SOLR-1516, but my understanding was that it 
was a response writer that made it easy for custom response writers to inherit 
from?  I'm not sure we should introduce that as a dependency for the standard 
response writers.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-13 Thread Noble Paul (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789916#action_12789916
 ] 

Noble Paul commented on SOLR-1123:
--

SOLR-1516 has the potential to simplify our existing responsewriters . 

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-13 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789922#action_12789922
 ] 

Uri Boness commented on SOLR-1123:
--

I think the main issue with the inheritance right now is that the 
QueryResponseWriter interface is dealing with a Writer rather than with an 
OutputStream. This accounts for the hacky GenericBinaryResponseWriter. 

Looking at SOLR-1516 I'm a bit confused. I always had the impression that the 
main idea behind the response writers is that all they need to know is how to 
marshal a NamedList (so they don't need explicit knowledge of documents, 
highlighting, etc...). But now the GenericTextResponseWriter knows about 
documents (via the SingleResponseWriter). But perhaps I just go it wrong.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-13 Thread Chris A. Mattmann (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789923#action_12789923
 ] 

Chris A. Mattmann commented on SOLR-1123:
-

{quote}
I think the main issue with the inheritance right now is that the 
QueryResponseWriter interface is dealing with a Writer rather than with an 
OutputStream. This accounts for the hacky GenericBinaryResponseWriter. 
{quote}

I'm taking a look at this.

{quote}
Looking at SOLR-1516 I'm a bit confused. I always had the impression that the 
main idea behind the response writers is that all they need to know is how to 
marshal a NamedList (so they don't need explicit knowledge of documents, 
highlighting, etc...). But now the GenericTextResponseWriter knows about 
documents (via the SingleResponseWriter). But perhaps I just go it wrong.
{quote}

Well if that's the main idea behind ResponseWriters as you put it, then as I 
put it in SOLR-1516, it's pretty confusing. Users (who understand Lucene and 
SOLR) know that if they query they get back o.a.lucene.Documents or 
o.a.solr.SolrDocumentList, etc. The whole NamedList structure is pretty 
confusing to me (and to others as I've noted on other issues and on the mailing 
list). SOLR-1516 was an attempt to give those people writing ResponseWriters 
(now) the ability to deal with results of queries, aka Documents (and not all 
the other NamedList typeless bag of objects where you have to do instanceof 
everwhere to unmarshall it). Clearly not all ResponseWriters will be able to 
take advantage of this (e.g., those that need the specified output structures 
provided by other components, e.g., Facets, etc.), which is why my original 
patch called the two response writers I added Document*ResponseWriter b/c 
that's what they dealt with.

Cheers,
Chris


 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-12-13 Thread Noble Paul (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789998#action_12789998
 ] 

Noble Paul commented on SOLR-1123:
--

bq. I always had the impression that the main idea behind the response writers 
is that all they need to know is how to marshal a NamedList ...

That is the problem. the NamedList is a weird datastructure for those who are 
not so used to Solr. You don't know what is included in that unless you do an 
instanceof. Most of the users are happy to write out the documents . 
understanding a SolrDocument is far easier than figuring outhow to handle a 
DocList .So it is an attempt to cater to those needs .  

If you know how to handle the NamedList beast then you can do that also ( but 
only if you wish to). 

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-05-20 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12711075#action_12711075
 ] 

Uri Boness commented on SOLR-1123:
--

Indeed this is just for convenience and should not be in a high priority, but I 
definitely see it as a nice to have one. Just to clarify, the suggestion is not 
to have another request parameter (that would probably be too much as you 
mentioned) but instead add a configuration parameter in solrconfig. So you'll 
be able to define the json response writer as follows:

{code:xml}
queryResponseWriter name=json 
class=org.apache.solr.request.JSONResponseWriter
bool name=useJsonContentTypetrue/bool
/queryResponseWriter
{code} 


 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-05-20 Thread Yonik Seeley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12711122#action_12711122
 ] 

Yonik Seeley commented on SOLR-1123:


Is there perhaps a more general feature we could turn this into?  An expert 
level ability or parameter to set a custom content-type?

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-05-20 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12711133#action_12711133
 ] 

Uri Boness commented on SOLR-1123:
--

I think that would be the best option. The problem right now is in the current 
class hierarchy of the response writers. Basically, I think the 
QueryResponseWriter interface should change to:

{code}
public interface QueryResponseWriter extends NamedListInitializedPlugin {
 
  public void write(OutputStream out, SolrQueryRequest request, 
SolrQueryResponse response) throws IOException;

  public String getContentType(SolrQueryRequest request, SolrQueryResponse 
response);

}
{code}

Note: this interface will play nicer with the binary response writer

Then we can have an AbstractTextResponseWriter which will serve as a parent for 
all non-binary response writers:

{code}
public abstract class AbstractTextResponseWriter extends 
NamedListInitializedPlugin {

  public final static String CONTENT_TYPE_PARAM = contentType;
  public static String DEFAULT_CONTENT_TYPE=text/plain; charset=UTF-8;
  
  private final String contentType;
  
  protected AbstractTextResponseWriter() {
this(DEFAULT_CONTENT_TYPE);
  }

  protected AbstractTextResponseWriter(String defaultContentType) {
this.contentType = defaultContentType;
  }

  public void init(NamedList args) {
String configuredContentType = (String) args.get(CONTENT_TYPE_PARAM);
if (configuredContentType != null) {
  contentType = configuredContentType;;
}
  }

  public String getContentType(SolrQueryRequest request, SolrQueryResponse 
response) {
return contentType;
  }
 
  public final void write(OutputStream out, SolrQueryRequest request, 
SolrQueryResponse response) throws IOException {
OutputStreamWriter writer = new OutputStreamWriter(out, UTF-8);
write(writer, request, response);
  }

  protected abstract void write(Writer writer, SolrQueryRequest request, 
SolrQueryResponse response) throws IOException;

}
{code}

This will make it easy for every response writer to define its default content 
type, yet it will still allow to override this default using the contentType 
parameter in solrconfig. (I assume here that there's no need to customize the 
content type for the binary response writer as it's internal and specific for 
the current implementation).

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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



[jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type

2009-05-20 Thread Shalin Shekhar Mangar (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12711136#action_12711136
 ] 

Shalin Shekhar Mangar commented on SOLR-1123:
-

Or we could just add a request parameter and SolrDispatchFilter can set the 
value of the param if it is present.

 Change the JSONResponseWriter content type
 --

 Key: SOLR-1123
 URL: https://issues.apache.org/jira/browse/SOLR-1123
 Project: Solr
  Issue Type: Improvement
Reporter: Uri Boness
 Fix For: 1.5

 Attachments: JSON_contentType_incl_tests.patch


 Currently the jSON content type is not used. Instead the palin/text content 
 type is used. The reason for this as I understand is to enable viewing the 
 json response as as text in the browser. While this is valid argument, I do 
 believe that there should at least be an option to configure this writer to 
 use the JSON content type. According to 
 [RFC4627|http://www.ietf.org/rfc/rfc4627.txt] the json content type needs to 
 be application/json (and not text/x-json). The reason this can be very 
 helpful is that today you have plugins for browsers (e.g. 
 [JSONView|http://brh.numbera.com/software/jsonview]) that can render any page 
 with application/json content type in a user friendly manner (just like xml 
 is supported).

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