# qinmou000/boostsearcher architecture

> Architecture diagram of the GitHub repository qinmou000/boostsearcher, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qinmou000/boostsearcher
- Repository: https://github.com/qinmou000/boostsearcher

## Overview

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: [`engine/src/searcher.cpp`](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp) (Query and ranking), [`engine/src/http_server.cc`](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/http_server.cc) (HTTP server), [`engine/src/index.cpp`](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/index.cpp) (Index builder and lookup), [`engine/third/cppjieba/QuerySegment.hpp`](https://github.com/qinmou000/boostsearcher/blob/master/engine/third/cppjieba/QuerySegment.hpp) (Chinese tokenization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content ingestion"]
  node_article_sources["Markdown articles"]
  node_parser["Corpus parser<br/>[parser.cc]"]
  node_raw_corpus["Delimited corpus"]
  node_sync_tool["Gitee sync tool"]
end

subgraph group_search["Search engine"]
  node_searcher["Query and ranking<br/>[searcher.cpp]"]
  node_index["Index builder and lookup<br/>[index.cpp]"]
  node_memory_index[("In-memory indexes")]
  node_tokenization["Chinese tokenization<br/>[QuerySegment.hpp]"]
  node_utilities["Text and file utilities<br/>[util.cpp]"]
  node_fuzzy_recall["Fuzzy recall<br/>[searcher.cpp]"]
end

subgraph group_serving["HTTP serving"]
  node_http_server["HTTP server<br/>[http_server.cc]"]
  node_json_results["Ranked JSON results<br/>[searcher.cpp]"]
  node_static_site["Static search page"]
end

subgraph group_integrations["External and vendor integrations"]
  node_gitee(("Gitee"))
  node_jieba_core["Jieba segmentation core"]
  node_http_library["HTTP library<br/>[httplib.h]"]
end

node_http_client(("HTTP clients"))

node_article_sources -->|"parses"| node_parser
node_parser -->|"writes corpus"| node_raw_corpus
node_raw_corpus -->|"loads corpus"| node_index
node_gitee -->|"provides posts"| node_sync_tool
node_sync_tool -->|"syncs articles"| node_article_sources
node_http_client -->|"queries"| node_http_server
node_http_server -->|"calls search"| node_searcher
node_searcher -->|"looks up terms"| node_index
node_index -->|"builds indexes"| node_memory_index
node_searcher -->|"tokenizes queries"| node_tokenization
node_index -->|"tokenizes documents"| node_tokenization
node_tokenization -->|"uses segmentation"| node_jieba_core
node_searcher -->|"expands misses"| node_fuzzy_recall
node_searcher -->|"returns results"| node_json_results
node_http_server -->|"serves requests"| node_http_library
node_http_server -->|"serves static files"| node_static_site

click node_parser "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/parser.cc"
click node_sync_tool "https://github.com/qinmou000/boostsearcher/blob/master/tools/sync_gitee_posts.py"
click node_http_server "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/http_server.cc"
click node_searcher "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp"
click node_index "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/index.cpp"
click node_tokenization "https://github.com/qinmou000/boostsearcher/blob/master/engine/third/cppjieba/QuerySegment.hpp"
click node_jieba_core "https://github.com/qinmou000/boostsearcher/tree/master/engine/third/cppjieba"
click node_utilities "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/util.cpp"
click node_fuzzy_recall "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp"
click node_json_results "https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp"
click node_http_library "https://github.com/qinmou000/boostsearcher/blob/master/engine/third/httplib.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_article_sources,node_parser,node_raw_corpus,node_sync_tool,node_http_client toneBlue
class node_searcher,node_index,node_memory_index,node_tokenization,node_utilities,node_fuzzy_recall toneAmber
class node_http_server,node_json_results,node_static_site toneMint
class node_gitee,node_jieba_core,node_http_library toneRose
```

## Components

### Content ingestion

- **Markdown articles**
- [Corpus parser](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/parser.cc): `engine/src/parser.cc`
- **Delimited corpus**
- [Gitee sync tool](https://github.com/qinmou000/boostsearcher/blob/master/tools/sync_gitee_posts.py): `tools/sync_gitee_posts.py`

### Search engine

- [Query and ranking](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp): `engine/src/searcher.cpp`
- [Index builder and lookup](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/index.cpp): `engine/src/index.cpp`
- **In-memory indexes**
- [Chinese tokenization](https://github.com/qinmou000/boostsearcher/blob/master/engine/third/cppjieba/QuerySegment.hpp): `engine/third/cppjieba/QuerySegment.hpp`
- [Text and file utilities](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/util.cpp): `engine/src/util.cpp`
- [Fuzzy recall](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp): `engine/src/searcher.cpp`

### HTTP serving

- [HTTP server](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/http_server.cc): `engine/src/http_server.cc`
- [Ranked JSON results](https://github.com/qinmou000/boostsearcher/blob/master/engine/src/searcher.cpp): `engine/src/searcher.cpp`
- **Static search page**

### External and vendor integrations

- **Gitee**
- [Jieba segmentation core](https://github.com/qinmou000/boostsearcher/tree/master/engine/third/cppjieba): `engine/third/cppjieba`
- [HTTP library](https://github.com/qinmou000/boostsearcher/blob/master/engine/third/httplib.h): `engine/third/httplib.h`

### Other components

- **HTTP clients**

## Connections

- 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 (evidence: `engine/src/http_server.cc`)
- Query and ranking → Index builder and lookup: looks up terms (evidence: `engine/src/searcher.cpp`)
- Index builder and lookup → In-memory indexes: builds indexes (evidence: `engine/src/index.cpp`)
- Query and ranking → Chinese tokenization: tokenizes queries (evidence: `engine/src/searcher.cpp`)
- Index builder and lookup → Chinese tokenization: tokenizes documents (evidence: `engine/src/index.cpp`)
- Chinese tokenization → Jieba segmentation core: uses segmentation (evidence: `engine/third/cppjieba/QuerySegment.hpp`)
- Query and ranking → Fuzzy recall: expands misses (evidence: `engine/src/searcher.cpp`)
- Query and ranking → Ranked JSON results: returns results (evidence: `engine/src/searcher.cpp`)
- HTTP server → HTTP library: serves requests (evidence: `engine/src/http_server.cc`)
- HTTP server → Static search page: serves static files
