Hello there! I was experimenting around parent-child relationships and I found interesting thing, but, I'd be glad if anyone would point out what needs to be done correctly.
Let's suppose we have an index with parent-child relationship, and we want to find parent with > different childs and different values though.
I try to build something like:
"query": {
"bool": {
"must": [
{
"match": {"type": "url"}
},
{
"match": {"isMain": false}
},
{
"has_child": {
"type": "child1",
"query": {
"bool": {
"must":
{"match": { "cube.x": 0 }}
}
}
}
},
{
"has_child": {
"type": "child1",
"query": {
"bool": {
"must": {
"match": {"cube.type": "FKU"}
}
}
}
}
}
]
}
}
}