ManageIQ/manageiq.org — pull request #172 by garrett (2014-10-31 17:33:03+00:00)
Title: Static site search

This is a port of the search engine I wrote for Springboard based sites, complete with some additional ManageIQ.org-specific fixes.

You can see it in action when running the development server. There's another version of the same code (minus the ManageIQ.org-specific stuff) at http://community.redhat.com/search/ — if you don't want to run a server just to see how this works.

I wrote this search engine to compile search terms during build time and then have some JavaScript to parse the input and do some ANDing with matched terms. Stopwords are filtered during search index compile time and unknown words on the client side are ignored.

I also added in some fuzzy matching for suggested terms, which is great for typos and for when there are words that are similar when no pages match.

In addition, there are also lot of keybindings to quickly navigate the search page, including tab-completion, arrow keys, and hitting ESC (to clear & focus the field).