Boolean Fields for Answers Facets

Facets are one of the most powerful features of a search experience. They can help guide users to find the answer they’re searching for, or they can make it easier for a user who’s in “browse mode”.

You can now use Boolean fields for Facets! On the configuration side, this works like any other field.

By default, the frontend will display “true” or “false” as the options for all boolean type fields. You can override these by specifying different labels in a fieldLabels option under the fields configuration (you might remember using this configuration option previously – it’s the same place where you specify the label for a facet, and whether a facet should be searchable).

"ComponentSettings" : {
  "Facets": {
	"expand": false, 
	"fields": {
    		'c_acceptingNewPatients':  {
      			"placeholderText": 'Search', 
      			"fieldLabels": {
        			     'false': 'not accepting patients',
        			     'true': 'accepting patients'
         		}
      		}
    	}
    }
}

:spiral_calendar: This feature will be available in GA

Hi @Jessica_Smith !

Thank you for this community post - this is incredibly helpful for using Yes/No facets within Answers. Question:

I’ve implemented your front-end changes for a Healthcare client looking to use facets for their Providers (configuration below):

However, the facets are still appearing as true/false, as opposed to yes/no:

image

I’m wondering if this is a potential bug, or if there is some step I am missing.

Thanks!
Ben