Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fastest auto-complete in the east
C++ JavaScript
Latest commit 8aa2942 @nilnilnil nilnilnil normalize keep-alive
Failed to load latest commit information.
src src/httpserver.cpp: fix Keep-Alive header.
tests normalize keep-alive
.gitmodules Removed checked source for libuv and http-parser, and added them as g…
Makefile Fix typo in
TODO Deduce the sortedness of the input instead of asking the user, which …


A very fast auto-complete server; to be used for as-you-type search suggestions.

I have written a blog post comparing various methods for implementing auto-complete for user queries.

lib-face implements Approach-4 as mentioned in the blog post. The total cost of querying (TCQ) a corpus of 'n' phrases for not more than 'k' frequently occurring phrases that share a prefix with a supplied phrase is O(k log n). This is close the best that can be done for such a requirement. lib-face also provides an option to switch to using another (faster) algorithm that results in a per-query run-time of O(k log k).

You can help by testing the new BenderRMQ data structure that has an O(n) space overhead and build cost and O(1) query cost. To read up on RMQ (Range Maximum Query), see here and here

lib-face is written using C++ and uses libuv and the joyent http-parser to serve requests.

Visit the Quick Start Guide to get started now!

See the Benchmarks!

Read the paper!

Something went wrong with that request. Please try again.