Added similar logic and tests for Filters aggregation