Can anyone help how can I specify query inside parent_id query to filter out children who has match in their parent docs.
For e.g.
This is my parent
// "JOIN_FIELD": "group",
"GROUP_MEMBER": [
"1",
"2",
"3",
"4",
"5",
"6",
"7"
]
and my child
// "JOIN_FIELD": {
"name": "child",
"parent": "1"
}
Now I want to see child info a member say "3".
// "query": {
"bool": {
"filter": [
{
"terms": {
"GROUP_MEMBER": [
"3"
]
}
}
but I have no clue how to proceed with getting all child of this parent selected. I have read has_child supports query field but it is quite costly since it performs full join.
I am using elasticsearch 6.2.4. Yes my all queries run well. I wish to know how to have filtration on children inside parent_id. Is there any way to do it currently or is it not at all supported?
This is exactly what I mean, I do not want all children but some which meet some filter criteria (which I do not understand where to specify).
And this query will be used very frequently in my application and I believe hasParent and hasChild impact performance. Will this be a good decision to apply those queries?
Can I use post_filter here to filter out the children returned by parent_id. Can you guide me if I am thinking in right direction?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.