Error Response as HTML in Solr 1.2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Response as HTML in Solr 1.2

Max Hütter
Hi all,

I switched to Solr version 1.2 and found that the response format
changed completely for the error responses (for updates), which are
delivered as HTML-Pages.

Before it was just XML coming back in all cases. Is there a way to
change this to XML? Some switch in the solrconfig.xml I didn't see?

Could I use a different RequestHandler? Should I use the new URL for
updates, I still use the leagacy form.

Best regards,

Max


--
Maximilian Hütter
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart

Tel            :  (+49) 0711 - 45 10 17 578
Fax            :  (+49) 0711 - 45 10 17 573
e-mail         :  [hidden email]
Sitz           :  Stuttgart, Amtsgericht Stuttgart, HRB 24106
Geschäftsführer:  Joachim Hörnle, Thomas Gentsch, Holger Dietrich
Reply | Threaded
Open this post in threaded view
|

Re: Error Response as HTML in Solr 1.2

Ryan McKinley
Maximilian Hütter wrote:
> Hi all,
>
> I switched to Solr version 1.2 and found that the response format
> changed completely for the error responses (for updates), which are
> delivered as HTML-Pages.

Check the status code for the response.  Anything not OK will have some
code != 200.  Using java's HttpURLConnection, you can get all the error
information from:
  getResponseCode()
  getResponseMessage()
Other languages will have similar functions.  The HTML decoration is
added from the servlet containter -- it does not have any extra information.

>
> Before it was just XML coming back in all cases. Is there a way to
> change this to XML? Some switch in the solrconfig.xml I didn't see?
>

Check the 'Upgrading from Solr 1.1' paragraph in CHANGES.txt
http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.2.0/CHANGES.txt

In short, to have identical behavior from 1.1 make sure there is not a
request handler mapped to /update

ryan
Reply | Threaded
Open this post in threaded view
|

Re: Error Response as HTML in Solr 1.2

Max Hütter
Ryan McKinley schrieb:

> Maximilian Hütter wrote:
>> Hi all,
>>
>> I switched to Solr version 1.2 and found that the response format
>> changed completely for the error responses (for updates), which are
>> delivered as HTML-Pages.
>
> Check the status code for the response.  Anything not OK will have some
> code != 200.  Using java's HttpURLConnection, you can get all the error
> information from:
>  getResponseCode()
>  getResponseMessage()
> Other languages will have similar functions.  The HTML decoration is
> added from the servlet containter -- it does not have any extra
> information.
>
>>
>> Before it was just XML coming back in all cases. Is there a way to
>> change this to XML? Some switch in the solrconfig.xml I didn't see?
>>
>
> Check the 'Upgrading from Solr 1.1' paragraph in CHANGES.txt
> http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.2.0/CHANGES.txt
>
> In short, to have identical behavior from 1.1 make sure there is not a
> request handler mapped to /update
>
> ryan
>
I'm using a servicemix-http component to access solr, so I can't really
use the HttpURLConnection. I can check for the Http status, but I can't
check the error response.

I will try to change the requesthandler on update.

Best regards,

max

--
Maximilian Hütter
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart

Tel            :  (+49) 0711 - 45 10 17 578
Fax            :  (+49) 0711 - 45 10 17 573
e-mail         :  [hidden email]
Sitz           :  Stuttgart, Amtsgericht Stuttgart, HRB 24106
Geschäftsführer:  Joachim Hörnle, Thomas Gentsch, Holger Dietrich