Hi all
I've have a doc with a nested document. in practice the nested field is an array.
first, is there a simple way to find all of a set of nested documents if I don't care about values in the root document?
if not, it seems I am unable to access the fields in the nested document when executing a nested query. but i can access fields in the root document. is this behavior expected?
below is the query i'm executing. it returns no fields in the result.
{
"query" : {
"nested" : {
"query" : {
"bool" : {
"must" : [ {
"term" : {
"parents.type" : "app"
}
}, {
"term" : {
"parents.id" : "C494277873EA9ADB1903CEA95F0C77C2"
}
} ]
}
},
"path" : "parents"
}
},
"fields" : [ "parents.type", "parents.id", "parents.name", "parents.version" ]
}
FWIW, the relevant portion of the mapping
"parents" : {
"properties" : {
"tags" : {
"analyzer" : "csv",
"type" : "string"
},
"id" : {
"index" : "not_analyzed",
"type" : "string"
},
"name" : {
"index" : "not_analyzed",
"type" : "string"
},
"type" : {
"index" : "not_analyzed",
"type" : "string"
}
},
"type" : "nested"
},
--
Chris K Wensel
chris@concurrentinc.com
http://www.concurrentinc.com
-- Concurrent, Inc. offers mentoring, support for Cascading