Maxime, forgot to mention, you can also distribute the load out by increasing the shard count and adding more nodes. But precomputing the field is probably the quickest way to improve that performance. Keep in mind that unlike SQL, ES aggregations may return approximate metrics if you have more than 1 shard.
-- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2ee82d59-f8c7-41cc-b777-3af6e18f6200%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.