Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Trey Grainger
Thanks for the great feedback, everyone.

Since the update handler currently already smart-defaults the response type
like Yonik is describing based on the incoming content type (whether you
specify the content-type header or not), it seems that we won't need to
make any changes there.

I just summarized everyone's feedback into action items and submitted a
JIRA (SOLR-10494 ) for
further tracking. If you have further comments or if I missed anything,
feel free to reply there.

Thanks,

Trey Grainger
Co-author, Solr in Action
SVP of Engineering @ Lucidworks

On Fri, Apr 14, 2017 at 11:35 PM, David Smiley 
wrote:

> It's a neat idea to have the response format smart-defaulted based on the
> POST content-type.  +1 to that!
>
> On Fri, Apr 14, 2017 at 11:24 PM Yonik Seeley  wrote:
>
>> 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 
>> 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
>>
>> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book: http://www.
> solrenterprisesearchserver.com
>


Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread David Smiley
It's a neat idea to have the response format smart-defaulted based on the
POST content-type.  +1 to that!

On Fri, Apr 14, 2017 at 11:24 PM Yonik Seeley  wrote:

> 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  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
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com


Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Yonik Seeley
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  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



Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Walter Underwood
I like that.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Apr 14, 2017, at 7:47 PM, Alexandre Rafalovitch  wrote:
> 
> We could put commented out wt=xml in the solrconfig.xml as a secondary 
> reminder.
> 
> Regards,
>Alex
> 
> http://www.solr-start.com/ - Resources for Solr users, new and experienced
> 
> 
> On 15 April 2017 at 03:53, Doug Turnbull
>  wrote:
>> Sounds great. I agree!
>> 
>> I can imagine there might be really old client libraries/integrations that
>> assume XML without sending a wt, but I think it's ok to break those sorts of
>> things in a major release. And those folks can learn to send wt=xml
>> 
>> -Doug
>> 
>> On Fri, Apr 14, 2017 at 2:53 PM Trey Grainger  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
> 



Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Alexandre Rafalovitch
We could put commented out wt=xml in the solrconfig.xml as a secondary reminder.

Regards,
Alex

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 15 April 2017 at 03:53, Doug Turnbull
 wrote:
> Sounds great. I agree!
>
> I can imagine there might be really old client libraries/integrations that
> assume XML without sending a wt, but I think it's ok to break those sorts of
> things in a major release. And those folks can learn to send wt=xml
>
> -Doug
>
> On Fri, Apr 14, 2017 at 2:53 PM Trey Grainger  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



Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Walter Underwood
This is guaranteed to break stuff, but I support it. Even though I put the 
first XML support into a search engine and worked for an XML database company.

Also, if someone even proposes a PDF response writer, I will hunt them down.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Apr 14, 2017, at 5:53 PM, Doug Turnbull 
>  wrote:
> 
> Sounds great. I agree!
> 
> I can imagine there might be really old client libraries/integrations that 
> assume XML without sending a wt, but I think it's ok to break those sorts of 
> things in a major release. And those folks can learn to send wt=xml
> 
> -Doug
> 
> On Fri, Apr 14, 2017 at 2:53 PM Trey Grainger  > 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



Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Doug Turnbull
Sounds great. I agree!

I can imagine there might be really old client libraries/integrations that
assume XML without sending a wt, but I think it's ok to break those sorts
of things in a major release. And those folks can learn to send wt=xml

-Doug

On Fri, Apr 14, 2017 at 2:53 PM Trey Grainger  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
>


Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Shawn Heisey
On 4/14/2017 12:53 PM, Trey Grainger 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.

+1

Sounds good to me, as long as it's master only, which is what the
message subject proposes.

Various docs will need to make this clear so when somebody upgrades,
finds their simple homegrown client no longer works, and goes looking
for the reason, it's easy to find.  With any luck, they will notice the
new default *before* they upgrade and encounter a problem.

Thanks,
Shawn


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



Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Erik Hatcher
While we’re at it, let’s also get rid of all the “experimental” in the 
responses too?


> On Apr 14, 2017, at 2:53 PM, Trey Grainger  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



Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Andrzej Białecki
I like it, too, +1.

> On 14 Apr 2017, at 20:56, David Smiley  wrote:
> 
> +1 makes sense to me.
> 
> On Fri, Apr 14, 2017 at 2:53 PM Trey Grainger  > 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
> -- 
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley 
>  | Book: 
> http://www.solrenterprisesearchserver.com 
> 


Re: Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread David Smiley
+1 makes sense to me.

On Fri, Apr 14, 2017 at 2:53 PM Trey Grainger  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
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com


Change Default Response Format (wt) to JSON in Solr 7.0?

2017-04-14 Thread Trey Grainger
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