When we are doing a terms aggregation we are getting buckets of keys but also some document count under "sum_other_doc_count"
Why are we getting this? How can we bucket these documents?
When we are doing a terms aggregation we are getting buckets of keys but also some document count under "sum_other_doc_count"
Why are we getting this? How can we bucket these documents?
Got it working.
Just in case some one faces the same issue:
Set "size":0 in your aggregation query to get back all documents.
You should be very careful setting "size":0
in the terms aggregation. It does not scale well for high cardinality fields and can easily lead to OutOfMemoryErrors due to the aggregation request having to stream a lot of transient state from the shards to the coordinating node (the node dealing with the request form your app).
© 2020. All Rights Reserved - Elasticsearch
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.