-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Algolia search: Cannot read property 'lvl0' of undefined #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 |
I have the same issue |
Can someone confirm this on |
I have had a quick play around with this and the new theme looks awesome 👍 When using the normal Algolia crawler instead of the DocSearch one I get this error. Example when using the Netlify DocSearch Plugin which sets up the crawler for you. The attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'], When using normal Algolia API details this still happens on the new theme. |
Oh, OK... I'm not that deep into Algolia but is this because of the algolia version is different in VitePress and Netlify? Or is Netlify DocSearch Plugin something totally different that we should be adding new config for it? 👀 |
Sorry for the delayed response, I think it may be beneficial for none open source users to be able to leverage their exisiting Algolia Crawler. It just comes down to how the crawlers attributes are setup. I will probably have a play when I have some time to allow the user to specify in the config which attributes the search works with. |
Closing due to inactivity. I'm not still 100% sure what we should do with the issue. Please feel free to open a new issue if there's anything. |
Describe the bug
When using Algolia search I'm getting this error in console and the search results do not appear. The API key is correct because the search results do appear when looking at XHR request.
Reproduction
I just installed a new vitepress app, added my Algolia API key and App Id and this error occurred
My config.js
Expected behavior
I expected to see the results appear in Algolia search box
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: