Querying on nested arrays?

I have an index that is made up of nested arrays, I have added an example
document and mapping below. I would like to do a query within the nested
array on one of the fields, here is my query:

{
"query" : {
"bool" : {
"must" : {
"terms" : {
"chapter[0].images[0].href.last_part_of_url" : [ "*" ]
}
}
}
}
}

The above query doesn't return anything, the I'm not sure if I am going
about this in the right way. How can I do a query on the values that are
indexed in the 'last_part_of_url' field?

Document:

{
"book":{
"chapter": [{
"id":"1",
"name": "Part 1",
"images":[{
"href":"http://somehost/somepath",
"type":"image/png"
}]
}],
}
}

Mapping:

{
"book":{
"chapter":{
"properties":{
"id":{
"type": "string",
"index": "analyzed"
},
"name":{
"type": "string",
"index": "analyzed"
},
"images":{
"properties": {
"href":{
"type":"multi_field",
"fields":{
"href":{
"type": "string",
"index": "analyzed"
},
"last_part_of_url":{
"type": "string",
"analyzer": "some_analyzer"
}
}
}
}
}
}
}
}
}

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Take a look at nested
mapping: http://www.elasticsearch.org/guide/reference/mapping/nested-type/
and nested
query: http://www.elasticsearch.org/guide/reference/query-dsl/nested-query/

--
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.
For more options, visit https://groups.google.com/groups/opt_out.