Elicsearch has_child query / filter in Kibana 4
I cannot get the query (or filter) to has_child
function in Kibana 4. My code works in elasticsearch directly as a curl script, but not in Kibana 4, but I figured out that this is a key update feature. Can anyone shed some light?
The script trace as shown below runs in elasticsearch returning all parents that have a child:
curl -XPOST localhost:port/indexname/_search?pretty -d '{
"query" : {
"has_child" : {
"type" : "object",
"query" : {
"match_all" : {}
}
}
}
}'
The above works fine. Then, to convert it to a JSON request to send to Kibana, I followed the general formatting rules: I dropped the curl line and added the index name (and sometimes an empty filter [], but it seems to make a big difference); no error is raised, but the entire dataset is returned.
{
"index" : "indexname",
"query" : {
"has_child" : {
"type" : "object",
"query" : {
"match_all" : {}
}
}
}
}
Am I missing something? Has anyone else got a request has_child
to run in Kibana 4?
Thank you very much in advance
Toby
source to share
No one has answered this question yet
Check out similar questions: