performance of aggregations as opposed to facets

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

performance of aggregations as opposed to facets

Ron Sher
Hi,

I know that facets are deprecated and going to be removed eventually.

But, we currently use facets and we're fine with its current behavior.

My question is do aggregations offer any improvement in performance? Or maybe a degradation due to added functionality?

Any experience?

We're starting to run queries in a loop that may suggest that facets are actually (a bit) faster.

Thanks for your feedback,

Ron

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3d272687-cd03-45d4-972c-96570396b3e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: performance of aggregations as opposed to facets

Adrien Grand-2
Aggregations are inherently slower than facets due to the increased flexibility. Aggregations are composable and the fact that you can feed any sub-aggregation with the documents that match a particular bucket makes the life of the JVM a bit harder. Facets can actually almost be considered as specialized aggregations (think of term_stats as an inlined stats aggregation under terms).

That said, the lack of flexibility was also an issue with facets, and for instance the term_stats facet did not have the same optimization as the terms facet did. This is something that is much better with aggregations since running terms or terms/stats actually use the same logic to build buckets per term.

Another thing to consider is that you can do MANY more things with aggregations: think of the top_hits, cardinality, percentiles, children, ... aggregations that did not have any equivalent with facets.




On Tue, Nov 4, 2014 at 5:43 PM, Ron Sher <[hidden email]> wrote:
Hi,

I know that facets are deprecated and going to be removed eventually.

But, we currently use facets and we're fine with its current behavior.

My question is do aggregations offer any improvement in performance? Or maybe a degradation due to added functionality?

Any experience?

We're starting to run queries in a loop that may suggest that facets are actually (a bit) faster.

Thanks for your feedback,

Ron

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3d272687-cd03-45d4-972c-96570396b3e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Adrien Grand

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4HUyO96k2PLGhaVi6mEbq9xhsedr4fNnzx2F%2BRbL3NDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.