# Usecase product list filter in E-commerce web app

**URL:** <https://discuss.elastic.co/t/usecase-product-list-filter-in-e-commerce-web-app/344116>\
**Category:** Elasticsearch\
**Created:** [September 29, 2023, 8:14am UTC](https://discuss.elastic.co/t/usecase-product-list-filter-in-e-commerce-web-app/344116 "2023-09-29T08:14:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hieuneo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hieuneo/32/126099_2.png) [@hieuneo](https://discuss.elastic.co/u/hieuneo)\
**Post date:** [September 29, 2023, 8:14am UTC](https://discuss.elastic.co/t/usecase-product-list-filter-in-e-commerce-web-app/344116/1 "2023-09-29T08:14:03Z")

</div>

Hello everyone, I have a usecase and hope you can help me find a solution  
I have a Product index, with fields brandId and categoryId,..., I need to filter by many brandId and many categoryId and aggregate by brandId and categoryId to get the available options.  
I created a query filter to get the product

And for each filter (brandId, categoryId,...) create an aggregate query to get the available options for each filter

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/2/c21e0e59e240cb73e91527f5ea14540f43f2b276.png)

Is there a more effective way? Please let me know  
thank you very much

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 27, 2023, 8:14am UTC](https://discuss.elastic.co/t/usecase-product-list-filter-in-e-commerce-web-app/344116/2 "2023-10-27T08:14:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
