Say I have a parent document with the following structure:
{
"join": {
"name": "parent"
}
"foo": 3
}
How could I query all documents where the join name is parent
?
I have tried the naive approach:
GET my-index/_search
{
"query" : {
"term": { "join.name" : "parent" }
}
}
But it returns 0 results. What am I missing?
You don't have to append .name
to the join
field.
GET my-index/_search
{
"query" : {
"term": { "join" : "parent" }
}
}