Yes, you are right. It worked ! -Vivek
On Mon, Aug 25, 2014 at 7:39 PM, Ahmet Arslan <iori...@yahoo.com.invalid> wrote: > Hi Vivek, > > how about this? > > Iterator<SolrDocument> iter = queryResponse.getResults().iterator(); > > while (iter.hasNext()) { > SolrDocument resultDoc = iter.next(); > > Collection<Object> content = > resultDoc.getFieldValues("discussions"); > } > > > > On Monday, August 25, 2014 4:55 PM, Vivekanand Ittigi < > vi...@biginfolabs.com> wrote: > Hi, > > I've multivalued field and i want to display all array elements using solrj > command. > > I used the command mentioned below but i'm able to retrieve only 1st > element of the array. > > response.getResults().get(0).getFieldValueMap().get("discussions") > Output: Creation Time - 2014-06-12 17:37:53.0 > > NOTE: "discussions" is multivalued field in solr which contains > > <arr name="discussions"> > <str>Creation Time - 2014-06-12 17:37:53.0</str> > <str>Last modified Time - 2014-06-12 17:42:09.0</str> > <str>Comment - posting bug from risk flows ...posting comment from > risk flows ...syncing comments ...</str> > </arr> > > Is there any solrj API used for retrieving multivalued elements or its not > possible..? > > -Vivek > >