SteeltoeOSS / Documentation

The documentation, api browser, and getting started guides used for the Steeltoe's website.
Apache License 2.0
8 stars 23 forks source link

Search is broken #297

Open Layla-P opened 1 year ago

Layla-P commented 1 year ago

Describe the bug

Try to search for something in the documentation using the search feature in the navbar. A spinner appears and nothing more happens.

Thoughts on the issue

This could have something to do with https://docs.steeltoe.io/index.json as I think this is where the search goes. However, this may or may not be related to the weird behaviour on doc page load (fans spin up ) and search-worker.js parsing this file which is ~13Mb

Looking deeper into the index.json file, it seems that, rather than actual keywords in the keyword section, it's an entire article. The JS library, Lunr, may not be implemented correctly. We should be able to run an index and cache the result, therefore negating the need to do it on EVERY page load - which is what I think may be happening.

Here is a link to the index pre-building. https://lunrjs.com/guides/index_prebuilding.html