HelpSearch

FTS5-backed search over the bundled help index.

Declared in src/libs/libhelp/help/HelpSearch.hpp
Inherits QObject

Detailed description

Extracts :/help/search.sqlite to QStandardPaths::CacheLocation/help/search-<build>.sqlite (one copy per build ID — SQLite cannot read from a qrc) and opens it read-only. query() runs an FTS5 MATCH ranked by bm25(fts, 0.0, 8.0, 3.0, 1.0); results carry a resolved heading anchor per the spec rules:

  • title-column hit → use the page's H1/title anchor (empty if the heading is the page's top H1);
  • h1h2 column hit → that heading's anchor;
  • body-only hit → nearest preceding H2/H3 from the headings table (binary-search via SQL).

When FTS5 returns fewer than minResults rows, query() retries with a fuzzy fallback that expands one term to its Levenshtein-1 neighbours (capped at one fuzzy term per query).

In this section