How can I do a cardinality aggregation to count objects? I tried below and it does not work when trying to count the number of distinct addresses in my index. However, if I change employee.address.* to employee.address.city I get the expected results, but just for the city field. Any help would be appreciated. Thanks.
Thanks for the suggestion. We have a ton of records that are already processed and indexed and we would have to redo all that in order to change the mapping and I am hoping to avoid that. Hopefully someone has a suggestion of how to do this with the mapping as it is. I wonder if objects are not supported by the cardinality aggregation in general? That is, you can't count the number of distinct objects, just their attributes.... ---
Roger that.....I will redo the processing/mapping of the data if this becomes a pressing requirement. Thanks.
NEW: Monitor These Apps!
Apache Lucene, Apache Solr and all other Apache Software Foundation project and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext