Solrj can support only xml writer and binary writer . It not possible get the response in Json . If your requirement is to get response in Json then you have to write parser .. Syed Abdul kather send from Samsung S3 On Jul 28, 2012 1:29 AM, "Federico Valeri [via Lucene]" < ml-node+s472066n3997784...@n3.nabble.com> wrote:
> Hi, I'm trying to get a JSON response with this Java code: > > SolrServer solr = new HttpSolrServer("http://localhost:8080/solr"); > ModifiableSolrParams params = new ModifiableSolrParams(); > params.set("qt", "/select"); > params.set("q", "contenuto:(" + query + ")"); > params.set("hl", "true"); > params.set("hl.fl", "id,contenuto"); > params.set("wt", "json"); > QueryResponse response = solr.query(params); > log.debug(response.toString()); > > but from log i see "&wt=javabin" in query > and "..docs=[SolrDocument{id=452011.." in response .. > > instead I would expect "&wt=json" and "..docs=[{id=452011.." > > What I am missing? > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://lucene.472066.n3.nabble.com/Solr-4-0-ALPHA-and-ModifiableSolrParams-tp3997784.html > To unsubscribe from Lucene, click > here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=472066&code=aW4uYWJkdWxAZ21haWwuY29tfDQ3MjA2NnwxMDczOTUyNDEw> > . > NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > ----- THANKS AND REGARDS, SYED ABDUL KATHER -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-ALPHA-and-ModifiableSolrParams-tp3997784p3997858.html Sent from the Solr - User mailing list archive at Nabble.com.