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 uses more memory but results in a per-query run-time of O(k log k).
The task of implementing a better RMQ data structure that takes up O(N) memory and O(1) query time is work in progress. Contributions are most welcome. To read up on RMQ (Range Maximum Query), see here and here
lib-face is written using C++ and uses the in-process Mongoose Web Server to serve requests.
Visit the Quick Start Guide to get started now!
See the Benchmarks!
Read the paper!