This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I started using Redis recently. I found the documentation contained a lot of very detailed pages about various topics, but as a beginner, I had a hard time navigating to quickly jump to the part I was interested in (namely, sorted sets and their methods).
It happens that I actually work on a project called DocSearch whose goal is to provide fast and relevant search to technical documentations. So I did a quick fork to add DocSearch to the Redis website. You can see how it looks and even try it live.
This PR contains the minimal code to make it work (including a CSS and JS dependency and editing some layout). I re-used the styling of the search that was already available on the command page, but made it available on all pages, and searching into both commands and topics. It searches into both the page titles and their content, display results as you type, with highlighted keywords, typo-tolerance and jumps you to the matching part of the page.
The way it works is by crawling the website every 24h, extracting content from the HTML and pushing it to Algolia's API. Then, the
docsearch.js
library listens to every keystroke in the searchbar and sends a search query to Algolia's API, and displays the results that are then returned in a dropdown.Let me know if this is something you'd be interested in adding, I'd by happy to clarify any question you might have, fix any issue, and/or clean up the PR to get this merged.