SolrDocumentList extends an ArrayList. You can iterate on it the way you would do on a list. Here's an example
for(SolrDocument doc : listingSearchResponse.getResults()){ > System.out.print(doc.getFieldValue("yourFieldName")); > } > Cheers Avlesh On Mon, May 4, 2009 at 10:36 AM, ahmed baseet <ahmed.bas...@gmail.com>wrote: > Hi All, > I'm able to get the whole result bundle by using the following method, > > QueryResponse qr = server.query(query); > > SolrDocumentList sdl = qr.getResults(); > > but I'm not able to iterate over the results. I converted this to string > and > displayed that and that is a full result bundle, I think its in XML. > Actually I want to display the result in a browser and each one separately, > I mean not as a bundle. There must be some standard methods for this, right > ? Can some one give me some pointers in this regard... I'm trying to > integrate the java method calls withing html code itself[ the solr server > is > on my box, and I want to do the testing on my box, so I want to access the > indexer from my local box's browser only]. Any good ideas on this? > > Thanks, > Ahmed. >