Tim Mackey
08/27/2024, 1:09 AMinstantsearch.widgets.dynamicWidgets
module to automatically generate search filter panels.
However, I have a couple values that I’m faceting on in the background with Scoped API Keys, and I don’t want these facets to show up on the frontend. Is there a way to exclude facets from being returned in the facet_counts
payload, or do I need to just filter out these facets in my frontend code?Tim Mackey
08/27/2024, 1:17 AMexclude_fields
option would exclude these values from the facets as well, but that doesn’t appear to be the case.Jason Bosco
08/27/2024, 2:10 AMI have a couple values that I’m faceting on in the background with Scoped API Keys, and I don’t want these facets to show up on the frontend.Could you elaborate on why you're faceting on them, if you don't want facet counts? Couldn't you remove those fields from facet_by, or if it's just a few values from the field you don't want to return, could you not add that to the embedded filter inside the scoped API key?
Jason Bosco
08/27/2024, 2:10 AMexclude_fields
only controls the fields inside the document
API responseTim Mackey
08/27/2024, 3:55 AMfacet_by
on the frontend, just but if I drop the field from my collection settings I get this error, which implies that faceting must be turned on even for an embedded filter:Could not find a filter field named `product_availability.preferred` in the schema
Ahhh, I just discovered that a field only needs to be indexed for filtering to work, and can have “facet” set to false. Things are working correctly now. Thanks for giving me the prompt to look through this again!