I would like a graph that only counts the elements that have the field "tcode".
I think I have to use JSON for it but I'm not sure maybe there is an easier way.
This is the JSON code I tried but it doesn't work (it still counts every element):
{
"query": {
"exists":{
"field": "tcode"
}
}
}
Thanks for the help! It does work when I do it like that .
But I'm look to make a graph with 2 Y-axis ( 1 with all elements and 1 with the elements that does have the tcode field.
So is there an other way then to use the filter?
I see - in that case you should be able to use the "Filters" aggregation with two filters to split the results into two buckets: * for all documents and _exists_:tcode for all documents that have the field.
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.