On Fri, Jul 17, 2009 at 12:21 PM, Amandeep Singh09<amandeep_sing...@infosys.com> wrote: > > Hi, > Thanks for your reply. But I need one clarification. When you say it will > contain the data you requested for, do you mean the data as requested in fl > parameter of the query? yes. if fl is not mentioned all the 'stored' fields are available > > Thanks. > Aman > > > -----Original Message----- > From: noble.p...@gmail.com [mailto:noble.p...@gmail.com] On Behalf Of Noble > Paul ??????? ?????? > Sent: Friday, July 17, 2009 11:30 AM > To: solr-user@lucene.apache.org > Subject: Re: What is the format of data contained in a Named List? > > The contents of SolrDocument is fixed. It will only contain the data > that you requested for > > > > On Fri, Jul 17, 2009 at 10:36 AM, Kartik1<amandeep_sing...@infosys.com> wrote: >> >> A named list contains a key value pair. At the very basic level, if we want >> to access the data that is contained in named list >> >> NamedList foo = thisIsSolrQueryResponseObject.getValues(); >> Entry<String, Object> bar = null; >> // Creating a iterator to iterate through the response >> Iterator<Entry<String, Object>> It =foo.iterator(); >> while (It.hasNext()) { >> bar = It.next(); >> SolrDocumentList solDocLst = (SolrDocumentList) bar.getValue(); >> for (int k = 0; k < solDocLst.size(); k++) { >> SolrDocument doc = solDocLst.get(k); >> .......... >> >> now what will this SolrDocument contain ? Will it contain all the values >> that match that particular record or only some values? Is this the correct >> way to iterate through the response ? I don't know lucene and only a little >> bit Solr. >> >> >> -- >> View this message in context: >> http://www.nabble.com/What-is-the-format-of-data-contained-in-a-Named-List--tp24528649p24528649.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > ----------------------------------------------------- > Noble Paul | Principal Engineer| AOL | http://aol.com >
-- ----------------------------------------------------- Noble Paul | Principal Engineer| AOL | http://aol.com