Logged as https://issues.apache.org/jira/browse/SOLR-17009 ________________________________ From: Chris Stewart <chris.stew...@intersystems.com.INVALID> Sent: Tuesday, October 3, 2023 18:39 To: users@solr.apache.org <users@solr.apache.org> Subject: RE: [SOLR] JSONP callback wrapper not working on Solr 9.3.1
Thanks for looking Eric and Jason I’m setting up a JIRA account now, and will get this logged Thanks Chris From: Eric Pugh <ep...@opensourceconnections.com> Sent: 03 October 2023 16:29 To: users@solr.apache.org Subject: Re: [SOLR] JSONP callback wrapper not working on Solr 9.3.1 I finally had a chance to look at this, and yeah, out of the box the json.wrf parameter is being ignored. I did: bin/solr start -c -e films And then this query should return JSON wrapped in a function call: http://localhost:8983/solr/films/select?q=*:*&fl=*&wt=json&debug=true&debug.explain.structured=true&hl=false&rows=10&json.wrf=angular.callbacks._1 Chris, could you open a Solr JIRA ticket for this? This is definitely a bug. Eric > On Sep 19, 2023, at 12:28 PM, Jason Gerlowski > <gerlowsk...@gmail.com<mailto:gerlowsk...@gmail.com>> wrote: > > Hi Chris, > > I'm not all that familiar with the "json.wrf" functionality, so I > could be off here. But starting in 9.3, Solr switched to using > Jackson for serialization and away from the homegrown code it's used > up to this point. I wonder whether that switch might've broken > "json.wrf" in 9.3? I tried to ask that question on the JIRA ticket > that made this change, so you might be interested to follow that here: > https://issues.apache.org/jira/browse/SOLR-16691<https://issues.apache.org/jira/browse/SOLR-16691><https://issues.apache.org/jira/browse/SOLR-16691<https://issues.apache.org/jira/browse/SOLR-16691>>. > > If that switch is the cause, you might be able to work around the > problem by telling Solr to use the old approach for serialization by > putting the following config in any relevant solrconfig.xml files: > > <queryResponseWriter name="json" class="solr.JSONResponseWriter"/> > > Best of luck, > > Jason > > > On Tue, Sep 12, 2023 at 2:35 AM Chris Stewart > <chris.stew...@intersystems.com.invalid<mailto:chris.stew...@intersystems.com.invalid>> > wrote: >> >> >> Hi Solr community >> >> I have been working on migrating from Solr 7.3.1 to Solr 9.3.0 and have hit >> an issue where my JSONP callback request isn't being handled correctly. When >> I request the callback function with wt=json, I am just getting normal JSON >> back. Specifying wt=python does wrap the return correctly, but the output is >> unsuitable for my framework >> >> My test cases are: >> >> wt=json&json.wrf=ng_jsonp_callback_0 on Solr 9.3.0 >> >> { "responseHeader":{ "status":0, "QTime":9, "params":{ >> >> wt=python&json.wrf=ng_jsonp_callback_0 on Solr 9.3.0 >> >> ng_jsonp_callback_0({ 'responseHeader':{ 'status':0, 'QTime':28, >> >> wt=json&json.wrf=ng_jsonp_callback_0 on Solr 7.3.1 >> >> ng_jsonp_callback_0({ "responseHeader":{ "status":400, "QTime":206, >> "params":{ >> >> >> Am I missing some config? I've checked over the release notes and >> documentation and can't see anything obviously different between my 2 >> versions to explain this? >> >> >> Many thanks in advance >> >> Chris >> >> >> _______________________ Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com<http://www.opensourceconnections.com><http://www.opensourceconnections.com<http://www.opensourceconnections.com>> <http://www.opensourceconnections.com/<http://www.opensourceconnections.com/><http://www.opensourceconnections.com/<http://www.opensourceconnections.com/>>> | My Free/Busy <http://tinyurl.com/eric-cal<http://tinyurl.com/eric-cal><http://tinyurl.com/eric-cal<http://tinyurl.com/eric-cal>>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw><https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>>> This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.