Many facets have a directly equivalent aggregation, and migration is as straightforward as replacing the keyword “facets” with “aggregations” or “aggs” in your query. For facets that do not have an equivalent aggregation, the Elasticsearch reference provides us with basic examples for migrating these facets to their aggregation counterparts. Two of these, query facets and facet filters, will be referenced in this post.

Keep reading