Algolia search response not displaying #8970
-
|
Hi all, new here :) sourcecode: https://github.com/mikehaart/wicbwwiki I'm using Docusaurus for a hobby project. I'm hosted on Netlify so I've installed the integration but when I use the search function on my site the response doesn't display in the UI. Looks like the request fires correctly and the response sends the right index information but getting nothing on the page. Not sure what to look into, suggestions welcome! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
Hey You are using optional options that you probably shouldn't here: algolia: {
// The application ID provided by Algolia
appId: 'DGMONGHJKH',
// Public API key: it is safe to commit it
apiKey: '211080b0a4c2c33dc0a2d0e25ac0c0f6',
indexName: 'netlify_2b25d0d1-0404-4bf1-a96d-fe292ed9901b_main_all',
// Optional: see doc section below
contextualSearch: false,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
externalUrlRegex: 'external\\.com|domain\\.com',
// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
replaceSearchResultPathname: {
from: '/docs/', // or as RegExp: /\/docs\//
to: '/',
},
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',
//... other Algolia params
}Not sure what is happening but I'd recommend to use a more minimal config to get started: algolia: {
appId: 'DGMONGHJKH',
apiKey: '211080b0a4c2c33dc0a2d0e25ac0c0f6',
indexName: 'netlify_2b25d0d1-0404-4bf1-a96d-fe292ed9901b_main_all',
}Your index name looks weird to me, are you sure it's the Algolia index name? Also note that you must ensure that the Algolia crawler did run (by default once every 24h but you can trigger it manually). The Algolia dashboard can tell if your index contains records or not, so make sure to double-check that your index is not empty. |
Beta Was this translation helpful? Give feedback.
-
|
It seems that when you use the Netlify plugin to integrate with Agolia search you are unable to access the crawler config. This presents a problem for Docusaurus since it expects the index to be presented in a certain way. As far as I can see the solution at the moment is just to simply avoid using that plugin. |
Beta Was this translation helpful? Give feedback.

It seems that when you use the Netlify plugin to integrate with Agolia search you are unable to access the crawler config. This presents a problem for Docusaurus since it expects the index to be presented in a certain way. As far as I can see the solution at the moment is just to simply avoid using that plugin.