How do I get all "one" _ids who has parent of referenceOne?
i.e. "referenceOne/one"
Here is the data.
What I want is "0000015a-5819-d3ce-afda-5bbb77040000". I thought maybe a terms query would work, but I am not seeing it. There might be more than one _id if there are more than 1 "one"
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 4,
"max_score": 1,
"hits": [
{
"_index": "index1",
"_type": "0000015a-5818-d3ce-afda-5bbacfea0002",
"_id": "0000015a-5819-d3ce-afda-5bbb769e0000",
"_score": 1,
"_source": {}
},
{
"_index": "index1",
"_type": "0000015a-5818-d3ce-afda-5bbacfea0002",
"_id": "0000015a-5819-d3ce-afda-5bbb76d50000",
"_score": 1,
"_source": {
"referenceOne": {
"_ref": "0000015a-5819-d3ce-afda-5bbb769e0000",
"_type": "0000015a-5818-d3ce-afda-5bbacfea0002"
}
}
},
{
"_index": "index1",
"_type": "0000015a-5818-d3ce-afda-5bbacfea0002",
"_id": "0000015a-5819-d3ce-afda-5bbb77040000",
"_score": 1,
"_source": {
"one": {
"x": 0,
"y": 0,
"_location": "0.0,0.0"
}
}
},
{
"_index": "index1",
"_type": "0000015a-5818-d3ce-afda-5bbacfea0002",
"_id": "0000015a-5819-d3ce-afda-5bbb773e0000",
"_score": 1,
"_source": {
"referenceOne": {
"_ref": "0000015a-5819-d3ce-afda-5bbb77040000",
"_type": "0000015a-5818-d3ce-afda-5bbacfea0002"
}
}
}
]
}
}