Closed flxwu closed 6 years ago
Fuse.js is pretty decent for this, as it can use fuzzy logic to match questions. It's also pretty lightweight and you can make it run on the website after everything is loaded, by getting content from the page and indexing it for later (so first few seconds, the search will be unresponsive). If implemented alongside a Service Worker, it could be really darn fast with preloaded content. Not sure how easy that is, though.
If we pre-load a JSON of questions, and slowly collate and fetch the questions this could be easy enough. With the issues related to search and pre-loading, I think a good next issue would be state design so that as we design the search and page navigation, since it sounds like React will be the front end, coming up with the data and state structure would be a big help for making sure things can render
We're closing this as well. We haven't talked about this for over a week. This might be a good thing to do once our codebase gets bigger.
This could get hairy