docusaurus: Algolia plugin SearchPage does not respect configuration

🐛 Bug Report

Use some algolia config like:

    algolia: {
      apiKey: '47ecd3b21be71c5822571b9f59e52544',
      indexName: 'docusaurus-2',
      contextualSearch: true,
      searchParameters: {facetFilters: ['bad:filter']},
    },

Due to the presence of bad:filter, it should actually never find any result.

But the current search page does not respect the plugin configuration options.

We should rather make the search page results consistent with the navbar search input / modal results, and use the plugin options.

Edit: if contextual search is not enable, we should not append any facet filter to the query by default, to prevent issues such as https://github.com/facebook/docusaurus/issues/4644

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 5
  • Comments: 15 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, any update on this ticket?

This continues to affect Docusaurus instances by creating an unexpected difference in behavior between the search bar and the search page. The solution was already discussed. What does this issue need to move forward?

Great that the recrawl fixed it. The other issue you mention is already fixed on master and will be in beta.4 (https://github.com/facebook/docusaurus/issues/5100) but you can use canary if you want: https://docusaurus.io/community/canary