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 Sami Siren <ss...@gmail.com> on 2012/08/07 07:35:53 UTC

Re: Problem with Solr 4.0-ALPHA and JSON response

On Fri, Jul 27, 2012 at 6:32 PM, Federico Valeri <fe...@gmail.com> wrote:
> Hi all,

Hi,

> I'm new to Solr, I have a problem with JSON format, this is my Java
> client code:
>

The java client (SolrServer) can only operate with xml or javabin
format. If you need to get the json response from Solr by using java
you could just use a http client directly and bypass the solr client.

> Now the problem is that I recieve the response but it doesn't trigger the
> javascript callback function.
> I see "wt=javabin" in SolrCore.execute log, even if I set wt=json in
> paramters, is this normal?

yes, to control the format used by the client there's a method
HttpSolrServer#setParser that set's the client parser (that also
overrides the wt param when the request is made)

--
 Sami Siren