[Yazlist] Yaz compatibility with solr >= 5.1

Mike Taylor mike at indexdata.com
Wed Jul 15 17:19:35 UTC 2015


Thanks for this account, Marios. What you've done certainly looks
reasonable. I'm just letting you know that Adam, who is our main
Metaproxy guru, is out of the office for a little while, so it will
probably be a week or two before you get a definitive response (and,
most likely, a new Metaproxy release incorporating this fix). Ping the
list again if you don't hear anything in a fortnight.

-- Mike.


On 15 July 2015 at 18:09, Marios Bartzokas <mbartzokas at atypon.com> wrote:
> Hi,
>
> We use metaproxy 1.8.10 with yaz 5.14.3 making requests to a solr index.
> And we recently switched from solr 4.10.4 to 5.2.1.
>
> This caused the requests from metaproxy to solr to fail with solr giving us
> the following error:
> HTTP 400 Bad Request -  Bad contentType for search handler :text/xml
>
> Looking in metaproxy logs I see that a request to solr has the following
> header;
> Content-type: text/xml
>
> By
> 1) googling the issue and having found
> http://lucene.472066.n3.nabble.com/Bad-contentType-for-search-handler-text-xml-charset-UTF-8-td4200314.html
> 2) looking in the solr source code
>
> we thought we should try using application/json as the Content-type in the
> request headers.
>
> After many failed attempts to achieve that by using the metaproxy
> http-rewrite filter, we changed the source code of yaz-5.14.3, file solr.c,
> function yaz_solr_encode_request,
>
> z_HTTP_header_add_content_type(encode, &hreq->headers,
> "text/xml;application/json", charset);
>
> to include the application/json in addition to text/xml.
>
> This successfully changed the Content-Type and the request to solr now
> succeeded.
>
> We wanted 1) to report that and 2) to ask whether you think it is a good
> solution or you would suggest another approach.
>
> Best Regards,
> Marios
>
>
>
>
> _______________________________________________
> Yazlist mailing list
> Yazlist at lists.indexdata.dk
> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
>



More information about the Yazlist mailing list