Yes actually, from some of the real world queries I've seen, the complexity of the query has a significant impact on aggregation performance.
We once enhanced one of our queries, which at first had a couple of match clauses. We added another one, which matched based on a field with shingles and trigrams applied. This made aggregations applied on that subset more than 2 times slower. How much impact this would have for you depends a lot on what you're actually doing in your query of course.
Thanks, glad you liked it!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Does query complexity make a huge impact?
I see you ran a simple text search within filter scope. How about cases when you have bool queries within bool queries or even nested ones?
This was a really nice article though, I never considered running aggregations using
msearch
👌Yes actually, from some of the real world queries I've seen, the complexity of the query has a significant impact on aggregation performance.
We once enhanced one of our queries, which at first had a couple of match clauses. We added another one, which matched based on a field with shingles and trigrams applied. This made aggregations applied on that subset more than 2 times slower. How much impact this would have for you depends a lot on what you're actually doing in your query of course.
Thanks, glad you liked it!