It can be challenging to get the right outcomes from your Elasticsearch aggregations. But it's possible to get precise results with tokenization, exact mappings, and a custom analyzer.In this article, we explain some of the subtleties that are inherent in the design of the Elasticsearch analyzer. We help you understand a common cause of erroneous result sets. Then we show you two methods for improving the results and getting them to be entirely accurate. We also provide many resources to help you gain proficiency in ES aggregations.