I have basic faceting features working, but was wondering, is there a common way to only show facet options for values that will narrow the search?
I have a collection called 'articles' that has a field for groupId which relates to a different collection for groups.
If I build an index on articles and show them in a table, I can also show a list of facets on the side that pulls from the groups collection, to allow filtering articles by group, but I'd rather not show ALL groups as facets as I have a lot of groups. I'd rather just show groups that have articles.
Another example would be if you combine the facets with a search input. If you begin typing in the search input, the index results change, so the number of rows in my table changes, so I would like the facets displayed to change at the same time. In that way, the facets that are displayed are only the ones that are relevant to your current search.
I have basic faceting features working, but was wondering, is there a common way to only show facet options for values that will narrow the search?
I have a collection called 'articles' that has a field for groupId which relates to a different collection for groups.
If I build an index on articles and show them in a table, I can also show a list of facets on the side that pulls from the groups collection, to allow filtering articles by group, but I'd rather not show ALL groups as facets as I have a lot of groups. I'd rather just show groups that have articles.
Another example would be if you combine the facets with a search input. If you begin typing in the search input, the index results change, so the number of rows in my table changes, so I would like the facets displayed to change at the same time. In that way, the facets that are displayed are only the ones that are relevant to your current search.
Any ideas on how I could implement this?