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 Rakhi Khatwani <rk...@gmail.com> on 2010/08/05 15:14:31 UTC

Using solr response json

Hi,
    i want to query solr and convert my response object to a json string
using solrj

when i query from my browser(with wt=json) i get the following result:
{
"responseHeader":{
"status":0,
"QTime":0},
"response":{"numFound":0,"start":0,"docs":[]
}}


 At the moment i am using google-gson (a third party api) to directly
convert an object into a json string
but somehow when i try converting a QueryResponse object into a json string
i get:

{"_header":{"nvPairs":["status",0,"QTime",1]},"_results":[],"elapsedTime":121,"response":{"nvPairs":["responseHeader",{"nvPairs":["status",0,"QTime",1]},"response",[]]}}

 Any pointers?

Regards
Raakhi.