lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caman <>
Subject RE: JSON formatted response from SOLR question....
Date Mon, 10 May 2010 14:53:00 GMT

Take a look at AjaxSolr source code:


This should give you exactly what you need.







From: Tod [via Lucene]
Sent: Monday, May 10, 2010 7:22 AM
To: caman
Subject: JSON formatted response from SOLR question....


I apologize, this is such a JSON/javascript question but I'm stuck and 
am not finding any resources that address this specifically. 

I'm doing a faceted search and getting back in my 
facet_counts.faceted_fields response an array of countries.  I'm 
gathering the count of the array elements returned using this notation: 

... where rsp is the eval'ed JSON response from SOLR.  From there I just 
loop through listing the individual country with its associated count. 

The problem I am having is trying to automate this to loop through any 
one of a number of facets contained in my JSON response, not just 
country.  So instead of the above I would have something like: 


... where VARIABLE would be the name of one of the facets passed into a 
javascript function to perform the loop.  None of the javascript 
examples I can find seems to address this.  Has anyone run into this? 
Is there a better list to ask this question? 

Thanks in advance. 


View message @
To start a new topic under Solr - User, email 
To unsubscribe from Solr - User, click
< (link removed) 
GZvcnRoZW90aGVyc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here. 


View this message in context:
Sent from the Solr - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message