Just a reminder that we have had indented JSON query responses by
default at the "/query" endpoint for years. That doesn't cover other
handlers though.
Readability/aesthetics of our docs/examples is where the biggest
deficiency lies - lots of XML examples that could have been JSON for a
long time now.  Hopefully this change would prevent new docs from
being written that use XML output format.

Other thoughts:
- The /query endpoint should remain, no need to break everyone who has
been using it
- I assume sending XML to the existing update handler should perhaps
continue to return an XML response?
- I assume that it's desirable to have indentation by default... but
this is also a slight back compat change/break for people that
currently specify JSON and expect it un-indented (for some response
types, the difference could be large, like 2x).  If we go this way, we
need to add that to the CHANGES as well.

-Yonik


On Fri, Apr 14, 2017 at 2:53 PM, Trey Grainger <solrt...@gmail.com> wrote:
> Just wanted to throw this out there for discussion. Solr's default query
> 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.
>
> Before I create a JIRA and submit a patch, though, I wanted to check here
> make sure there were no strong objections to changing the default.
>
> -Trey Grainger

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

Reply via email to