Skip to content
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

Add search to the commands and topics #156

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pixelastic
Copy link

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.

2018-10-12_18h28m13

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.

@pixelastic
Copy link
Author

Hey, @antirez congrats on the 5.0 release. I updated the PR and search results with the updated content.

Let me know if this site-wide search is something you'd be interested in. I'd be happy to help integrate it in the real website.

Cheers,

@s-pace
Copy link

s-pace commented Apr 24, 2019

👋 @antirez

Happy to help in any way to enhance the search. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants