# Kibana 4 has\_child query/filter

**URL:** <https://discuss.elastic.co/t/kibana-4-has-child-query-filter/20599>\
**Category:** Elasticsearch\
**Created:** [November 6, 2014, 10:00am UTC](https://discuss.elastic.co/t/kibana-4-has-child-query-filter/20599 "2014-11-06T10:00:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lgyvtnlg](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@lgyvtnlg](https://discuss.elastic.co/u/lgyvtnlg)\
**Post date:** [November 6, 2014, 10:00am UTC](https://discuss.elastic.co/t/kibana-4-has-child-query-filter/20599/1 "2014-11-06T10:00:14Z")

</div>

Hi all

I cannot seem to get the has\_child query (or filter) to function in Kibana  
4. My code works in elasticsearch directly as a curl script, but not in  
Kibana 4, yet I understood this was a key feature of the upgrade. Can  
anybody shed any light?

The curl script as follows works in elasticsearch, returning all of the  
parents where they have a child object:

```
curl -XPOST localhost:port/indexname/_search?pretty -d '{
    "query" : {
        "has_child" : {
            "type" : "object",
                "query" : {
                    "match_all" : {}
                }
        }
    }
}'

```

The above runs fine. Then to convert it to the JSON query to submit within  
Kibana, I've followed the general formatting rules: I've dropped the curl  
line and added the index name (and sometimes a blank filter [], but it  
doesn't seem to make much difference); no error is thrown but the whole  
dataset returns.

```
{
  "index" : "indexname",            
     "query" : {
        "has_child" : {
            "type" : "object",
                "query" : {
                    "match_all" : {}
                }
        }
    }
}

```

Am I missing something? Has anybody else got a has\_child query to run in  
Kibana 4?

Many thanks in advance

Toby

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e4322e7b-e380-4d23-a598-3b93fd9b71ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e4322e7b-e380-4d23-a598-3b93fd9b71ef%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:51am UTC](https://discuss.elastic.co/t/kibana-4-has-child-query-filter/20599/2 "2017-07-06T00:51:53Z")

</div>


