Do not use underscore for SXA facets

02 October 2018 at 00:00 by Ruud van Falier - Post a comment

Just a quick headsup to people using SXA search:

When you use underscores in your facet names (for example: "document_type"), filtering on those assets might not work.

This is caused by the Javascript that is responsible for generating the API URL for search results (component-search-url.js) that needs to split facet names on underscore to accomodate for signatures that may be used with search components (thanks to Michael West for pointing that out).

So save yourself some debugging time and avoid using underscores in your facet names!