Retrieve Nest data of a field

Hello All,

I have a nested field which as array of data such as
{"Name":"A","Genres":[{"genre":"A","genre":"B"}]}. Could you please let me
know(if let me have sample project) for reading information inside field
'Genres' which is an arrayList.

Thank you
Ali

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bb2a1828-1ad6-4bd6-a9c8-5fe3a4d8ccfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I found the answer and put it here for others:
We have to put the data inside an ArrayList that its data are in Map type:

ArrayList<Map<String,String>> fields = (ArrayList<Map<String,String>>) hit
.sourceAsMap().get("Genres")

On Thursday, February 26, 2015 at 11:31:55 AM UTC-5, Ali Lotfdar wrote:

Hello All,

I have a nested field which as array of data such as
{"Name":"A","Genres":[{"genre":"A","genre":"B"}]}. Could you please let me
know(if let me have sample project) for reading information inside field
'Genres' which is an arrayList.

Thank you
Ali

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d0441707-ff55-4925-8a9a-03b1f2046324%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.