You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Maximilian Hütter <mh...@blue-elephant-systems.com> on 2007/06/27 10:42:51 UTC
Error Response as HTML in Solr 1.2
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 : max.huetter@blue-elephant-systems.com
Sitz : Stuttgart, Amtsgericht Stuttgart, HRB 24106
Geschäftsführer: Joachim Hörnle, Thomas Gentsch, Holger Dietrich
Re: Error Response as HTML in Solr 1.2
Posted by Maximilian Hütter <mh...@blue-elephant-systems.com>.
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 : max.huetter@blue-elephant-systems.com
Sitz : Stuttgart, Amtsgericht Stuttgart, HRB 24106
Geschäftsführer: Joachim Hörnle, Thomas Gentsch, Holger Dietrich
Re: Error Response as HTML in Solr 1.2
Posted by Ryan McKinley <ry...@gmail.com>.
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