lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kartik1 <>
Subject What is the format of data contained in a Named List?
Date Fri, 17 Jul 2009 05:06:34 GMT

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 =;
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:
Sent from the Solr - User mailing list archive at

View raw message