Unfortunately, the various writer types are inconsistent in terms of which ones 
accept the “content-type” override config parameter and which have that 
parameter configured in the example solrconfig.

For example, PHP takes the config parameter, but Python doesn’t – and Python 
always returns content type as plain text

-- Jack Krupansky

From: Shai Erera 
Sent: Tuesday, July 02, 2013 7:56 AM
To: [email protected] 
Subject: Re: Solr Content-Type for JSON

Thanks that worked!


Shai




On Tue, Jul 2, 2013 at 2:51 PM, Stefan Matheis <[email protected]> wrote:

  Shai 

  There's a note about this, in the sample config: 
http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/collection1/conf/solrconfig.xml?view=markup#l1742

  - Stefan
  On Tuesday, July 2, 2013 at 1:33 PM, Shai Erera wrote:

    Hi

    I noticed that if I set wt=json, I get back response with 
content-type=plain/text instead of application/json. I do see in 
JsonResponseWriter that the content type is set correctly, since 3.5.


    Any ideas why am I getting back the wrong header? I use 4.3.1 and followed 
the simple tutorial, indexed the example docs and changed the 'wt' parameter: 
http://localhost:8983/solr/select/?q=video&fl=id,name,price&wt=json


    Copy-paste from Firebug:


    Response Headers
          Content-Type   text/plain;charset=UTF-8 
          Transfer-Encoding   chunked 

    Shai


Reply via email to