algoliadocusaurus

Algolia DocSearch in Docusaurus doesn't bring any results


my docs-site got approved from Algolia and their crawler also was able to index a few hundred records there, so that side seems to work. In my docusauras.config.js I have added the following under themeConfig:

algolia: {
  appId: '7********C',
  apiKey: '9*****************************5',
  indexName: 'o******t',
  contextualSearch: true,
},

Now the search bar at the top of the site appears but it does not find anything when searching: No results for "xyz" ; whatever I search for (which's on the site ...)

Any ideas what I'm doing wrong? The apiKey is the "Search API Key", right?

Unsuccessfull search on site:

enter image description here

Algolia: Application interface (API):

enter image description here

Invitation/Confirmation mail from Algolia: [mail from Algolia]

enter image description here


Solution

  • As cmgchess suggested, that's the issue I had: https://github.com/facebook/docusaurus/issues/7647

    The problem is a recent update of Docusaurus, since which contextual search is enabled by default. The problem: Algolia's default config for Docusaurus v1 and older Docusaurus v2 versions didn't have an option for this attribute to configure the crawler.

    To solve:

    1. Delete the current index
    2. Copy the new v2 config from https://docsearch.algolia.com/docs/templates/#docusaurus-v2-template or directly create the crawler at https://crawler.algolia.com/admin/crawlers/create
    3. Re-run crawler (will create an index).
    4. Redeploy the Docusaurus site.