I’m a user of Algolia DocSearch service. It has been great so far to be able to get search functionality with very minimal setup/work on my part. I need some help with adding a new facet.
My documentation site is built using Docusaurus (version 1), which integrates very well with Algolia DocSearch.
My documentation site: https://documentation.elasticpath.com/commerce-cloud/
Algolia Search Config: https://github.com/algolia/docsearch-configs/blob/master/configs/elasticpath_commerce-cloud.json
The Search UI on the documentation site is the default/out-of-the box. I have already created a new search UI using react-instantsearch library from algolia, which is accessible at the documentation homepage.
In my custom search UI, I need to add the option to be able to filter by results that are usually “grouped together” in the out of the box DocSearch UI.
Bellow is a screenshot of the out of the box DocSearch UI and I’ve highlighted the items that are being used for grouping.
Below is a screenshot of my custom Search UI where the same items are highlighted.
I need to make search results to be filterable by those highlighted items. I know that
customSettings.attributesForFaceting array in the search config is used for defining/configuring what facets are available. Even if I add a new item (let’s call it “Category”), I’m not sure how these array values are linked to the actual content.