I am moving from ElasticSearch 1.7 to 2.0. Previously while calculating Term Facets I got the Total Count as well. This will tell in how many documents that field exists. This is how I was doing previously.
Now in current version for Term Aggregation we don't have anything as Total Count. I am getting DocCount inside Aggregation bucket. But that will not work for muti-valued fields.
Is there any way I can get Total count of the field from term aggregation. As I am already firing Term Aggregation query, I don't want to fire exists Filter query. Is there any way to do this using aggregations.
I think this "Value Count" aggregate counts the value of the Field mentioned in the query. This will not work for multi-value fields. e.g If I have 2 documents with Field "Name" and that field has value as ["John", "Jack", "Reacher"] in one document and ["Jack","Reacher"] in 2nd document then this will give me result as 5, because it will count the values. But I want only the field count which is 2.
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.