How qinmou000/boostsearcher works
Boost Searcher is a local Markdown search service. Its offline workflow parses Markdown into a delimited corpus; at startup, the service builds in-memory forward and inverted indexes, then accepts HTTP queries and returns ranked JSON results with summaries and document paths. Search includes Chinese tokenization and fuzzy recall. A separate tool synchronizes Gitee articles into the Markdown corpus; the README says indexing those updates requires rerunning the parser and restarting the service. The graph follows documented workflows and sampled calls; unsampled implementation details are not inferred.
Main entry points: searcher.cpp Query and ranking · http_server.cc HTTP server · index.cpp Index builder and lookup · QuerySegment.hpp Chinese tokenization
Components 17
Content ingestion
- Markdown articles
- Corpus parser
engine/src/parser.cc - Delimited corpus
- Gitee sync tool
tools/sync_gitee_posts.py
Search engine
- Query and ranking
engine/src/searcher.cpp - Index builder and lookup
engine/src/index.cpp - In-memory indexes
- Chinese tokenization
engine/third/cppjieba/QuerySegment.hpp - Text and file utilities
engine/src/util.cpp - Fuzzy recall
engine/src/searcher.cpp
HTTP serving
- HTTP server
engine/src/http_server.cc - Ranked JSON results
engine/src/searcher.cpp - Static search page
External and vendor integrations
- Gitee
- Jieba segmentation core
engine/third/cppjieba - HTTP library
engine/third/httplib.h
Other components
- HTTP clients
Connections 16
- Markdown articles → Corpus parser: parses
- Corpus parser → Delimited corpus: writes corpus
- Delimited corpus → Index builder and lookup: loads corpus
- Gitee → Gitee sync tool: provides posts
- Gitee sync tool → Markdown articles: syncs articles
- HTTP clients → HTTP server: queries
- HTTP server → Query and ranking: calls search
engine/src/http_server.cc - Query and ranking → Index builder and lookup: looks up terms
engine/src/searcher.cpp - Index builder and lookup → In-memory indexes: builds indexes
engine/src/index.cpp - Query and ranking → Chinese tokenization: tokenizes queries
engine/src/searcher.cpp - Index builder and lookup → Chinese tokenization: tokenizes documents
engine/src/index.cpp - Chinese tokenization → Jieba segmentation core: uses segmentation
engine/third/cppjieba/QuerySegment.hpp - Query and ranking → Fuzzy recall: expands misses
engine/src/searcher.cpp - Query and ranking → Ranked JSON results: returns results
engine/src/searcher.cpp - HTTP server → HTTP library: serves requests
engine/src/http_server.cc - HTTP server → Static search page: serves static files