Replies: 3 comments 1 reply
-
I found this https://discourse.algolia.com/t/docusaurus-x-algolia-x-netlify-not-crawling-hierarchy/13068/14 and I went in and added all the "attributesToRetrieve" like "hierarchy.lvl0", "hierarchy.lvl1", like URL says. No dice, seems there something else going on? |
Beta Was this translation helpful? Give feedback.
-
Doks comes with FlexSearch preconfigured out of the box. If you want to use DocSearch in stead, this guide will explain how. |
Beta Was this translation helpful? Give feedback.
-
I think what you want to do is al little bit more difficult. I researched the same thing, but doks uses docsearch instead of Algoliasearch. While they are both basically the same thing, the code differs a bit. Docsearch uses its own packages with UI widgets instead of the InstantSearch UI widgets for example. This means that you have to closely replicate the default search index that docsearch makes for you when it crawls your website. And this is likely not the case resulting in errors. Read this topic for more information: https://discourse.algolia.com/t/docsearch-ui-widget/16393 I almost got an Algolia implementation working, but the autocomplete is still giving me issues. Algolia as an alternative to docsearch is not that relevant for people that only uses doks as a documentation website I think (although you must meet a lot of requirements). Nevertheless, Algolia would be useful for people that use doks as a more general purpose website. |
Beta Was this translation helpful? Give feedback.
-
I noticed this project theme had Algolia that works a lot better, the main template repo theme search was unusable for me on mobile devices to due overflow issues. I ended up forking getdoks.org repo to take advantage of Algolia and use it as a base. I went through and found your API creds and swapped them over to mine for algolia, but after that the search just broke. It's bizarre as I can CURL good results using same keys when done manually. The search box itself does not return any results and gives the console error
"Uncaught (in promise) TypeError: can’t access property “lvl1”, a.hierarchy is undefined "
Project is hosted on Netlify through this repo https://github.com/TempusOwl/getdoks.org and site is live at https://tempusowl.com/docs/prologue/introduction/ I am using the Algolia crawler plugin through Netlify to generate the records on build.
Any thoughts of what I am missing here?
Beta Was this translation helpful? Give feedback.
All reactions