Add keyword search to a Go web app so users can find posts or documents with ranked results instantly
Build a Chinese-language search feature for a microblog or news site with relevance and proximity scoring
Embed a high-throughput search index (19,000 queries/second) inside a Go service without running a separate search server
Save and reload the search index to disk so the engine survives restarts without re-indexing everything
Requires a Chinese dictionary file for word segmentation, English documentation is sparse so expect to read the linked Chinese tutorial.
Wukong is a full-text search engine library written in Go. A full-text search engine lets your application search across a collection of text documents by keyword, returning the most relevant results quickly. Wukong is designed to be embedded in your own Go application rather than run as a standalone service. The README is written in Chinese and describes an engine built with Chinese-language content in mind, though the underlying technology applies to other languages too. Key numbers cited: indexing one million short posts totaling 500MB takes about 28 seconds, search responses average 1.65 milliseconds, and the engine handles around 19,000 search queries per second. Chinese word segmentation is built in using a companion library called sego, processing text at 27 megabytes per second. Beyond basic keyword matching, the engine supports proximity scoring (rewarding results where searched terms appear close together in the original text), BM25 relevance scoring (a standard formula used in information retrieval to rank how well a document matches a query), and custom scoring rules so developers can define their own ranking logic. Documents can be added and removed from the index while the engine is running, without restarting. The index can also be saved to disk and reloaded, and a distributed mode is mentioned for spreading work across multiple machines. The code example in the README shows the minimal setup: initialize the engine with a dictionary file, add a few documents, flush the index, and run a search. The result is a ranked list of matching documents. The project is released under the Apache License v2, which permits commercial use. The README is sparse in English documentation but links to a tutorial that walks through building a microblog search site in under 200 lines of Go code.
← huichen on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.