Filter based on "docusaurus_tag"

Hi everyone,

I’m using the Docsearch v2 integration with Docusaurus, and I want my search results to filter based on the current docset that a user is visiting.

I tried adding algolia.searchparameters.facetFilters: ["docusaurus_tag"] to my docusaurus.config.js file, but this setting doesn’t seem to actively filter even when ContextualSearch is enabled. Is there a way to pull the user’s current docusaurus_tag in to filter on their search?

Hey @jwitz,

I’m using the Docsearch v2 integration with Docusaurus,

ContextualSearch is only available with Docusaurus v2/DocSearch v3. For DocSearch v2, you should refer to: Enabling Search · Docusaurus

With Docusaurus v2, you don’t need to apply any logic on top of it since filters will automatically be sent to Algolia based on the currently browsed documentation. You can read more here: Search | Docusaurus

Have a great day :smiley: