10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.25k stars 311 forks source link

Filter search - show results under different attributes #1897

Closed simplenotezy closed 3 years ago

simplenotezy commented 4 years ago

Is it possible with ElasticPress to generate a "search page" that shows available filterable product options as well as a count of how many products that exists under this specific filter?

Eg. if we have a search page where user has checked category "Rings", then we want to show all product attributes that are available for products under Rings as well as a count for how many products that reside under this Category and Product Attribute.

Figuratively something like this:

Category: [ x ] Rings (321) [ ] Necklaces (21) [ ] Armbands (43)

Color: [ ] Blue (22) [ ] Brown (12) [ ] Black (7)

felipeelia commented 3 years ago

Hi @simplenotezy ,

Sorry for the super late response here. If you are still searching for a solution, it seems you could use the Facets feature. It would be just a matter of going to the ElasticPress Features page, enabling Facets, and instantiating the Facets widget on your theme.

Thanks!