[
https://issues.apache.org/jira/browse/SOLR-10494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099004#comment-16099004
]
Steve Rowe commented on SOLR-10494:
-----------------------------------
Smoke tester is unhappy on master because a Solr query response is in JSON vs
XML - from [https://builds.apache.org/job/Lucene-Solr-SmokeRelease-master/823/]:
{noformat}
[...]
[smoker] Solr techproducts example launched successfully. Direct your Web
browser to http://localhost:8983/solr to visit the Solr Admin UI
[smoker] test utf8...
[smoker] run query...
[smoker] FAILED: response is:
[smoker] {
[smoker] "responseHeader":{
[smoker] "status":0,
[smoker] "QTime":0,
[smoker] "params":{
[smoker] "q":"video"}},
[smoker] "response":{"numFound":3,"start":0,"docs":[
[...]
{noformat}
>From {{smokeTestRelease.py}}:
{code}
859: print(' run query...')
860: s = load('http://localhost:8983/solr/techproducts/select/?q=video')
861: if s.find('<result name="response" numFound="3" start="0">') == -1:
862: print('FAILED: response is:\n%s' % s)
{code}
> Switch Solr's Default Response Type from XML to JSON
> ----------------------------------------------------
>
> Key: SOLR-10494
> URL: https://issues.apache.org/jira/browse/SOLR-10494
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Response Writers
> Affects Versions: 7.0
> Reporter: Trey Grainger
> Assignee: Hoss Man
> Priority: Blocker
> Fix For: 7.0, master (8.0), 7.1
>
> Attachments: SOLR-10494, SOLR-10494, SOLR-10494.branch_7x.patch,
> SOLR-10494.patch, SOLR-10494.patch, SOLR-10494.patch,
> SOLR-10494-withdocs.patch, SOLR-10494-withdocs.patch
>
>
> Solr's default response format is still XML, despite the fact that Solr has
> supported the JSON response format for over a decade, developer mindshare has
> clearly shifted toward JSON over the years, and most modern/competing systems
> also use JSON format now by default.
> In fact, Solr's admin UI even explicitly adds wt=json to the request (by
> default in the UI) to override the default of wt=xml, so Solr's Admin UI
> effectively has a different default than the API.
> We have now introduced things like the JSON faceting API, and the new more
> modern /V2 apis assume JSON for the areas of Solr they cover, so clearly
> we're moving in the direction of JSON anyway.
> I'd like propose that we switch the default response writer to JSON (wt=json)
> instead of XML for Solr 7.0, as this seems to me like the right direction and
> a good time to make this change with the next major version.
> Based upon feedback from the Lucene Dev's mailing list, we want to:
> 1) Change the default response writer type to "wt=json" and also change to
> "indent=on" by default
> 2) Make no changes on the update handler side; it already works as desired
> (it returns the response in the same content-type as the request unless the
> "wt" is passed in explicitly).
> 3) Keep the /query request handler around since people have already used it
> for years to do JSON queries
> 4) Add a commented-out "wt=xml" to the solrconfig.xml as a reminder for folks
> on how to change (back) the response format.
> The default format change, plus the addition of "indent=on" are back compat
> changes, so we need to make sure we doc those clearly in the CHANGES.txt.
> There will also need to be significant adjustments to the Solr Ref Guide,
> Tutorial, etc.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]