WeKnora/website-docs/04-api
MercuialC c7601b2d2a
feat(wiki): 增加跨知识库 Wiki 搜索 POST /wiki-search (#3535)
* feat(wiki): add cross-KB wiki search POST /wiki-search

Give external callers a knowledge-search counterpart for wiki pages: one
SQL IN query ranked by title/slug/summary/content, slim hits with
match_snippet, and Viewer retrieve auth including shared KBs.

* fix(wiki): satisfy golangci-lint on cross-KB wiki search

Check c.Error returns, wrap lines over 120 columns, and use wikiDialect
instead of the embedded Dialector selector.

* fix(wiki): address review on cross-KB search helpers

Share KB viewer auth and snippet extraction, keep ID limits in the
service layer, and escape SQLite LIKE wildcards.

* fix(lint): wrap knowledge span fixtures over 120 columns

Go Lint still diffs from the original PR base, so later main tests
in knowledge_spans_test.go were reported as new line-length issues.

* fix(wiki): authorize KB access before checking wiki enablement in cross-KB search

Checking IsWikiEnabled before AuthorizeKBAccess let a caller tell apart a
foreign KB with wiki disabled (400) from one it cannot see (404), leaking
the KB's existence and settings. Run the access check first.

---------

Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: wizardchen <wizardchen@tencent.com>
Co-authored-by: lyingbug <xiayula2014@gmail.com>
2026-09-25 22:22:58 +08:00
..
01-api-overview.md feat(wiki): 增加跨知识库 Wiki 搜索 POST /wiki-search (#3535) 2026-09-25 22:22:58 +08:00
02-api-agent-mcp.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-auth.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-channels.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-chat.md fix(retrieval): fix recall correctness, score scales, cost and agent tools (#3687) 2026-09-25 10:48:18 +08:00
02-api-chunks.md feat(chat): open cited documents at the cited passage (#3700) 2026-09-25 13:26:16 +08:00
02-api-faq-wiki.md feat(wiki): 增加跨知识库 Wiki 搜索 POST /wiki-search (#3535) 2026-09-25 22:22:58 +08:00
02-api-infra.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-knowledge.md feat(gallery): add an image gallery tab with schema-driven filters (#3694) 2026-09-25 12:33:59 +08:00
02-api-memory.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-model-system.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-org.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-sandbox-skills.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00
02-api-system.md feat(models): add system admin model catalog console (#3662) 2026-09-24 16:31:45 +08:00
02-api-tenant.md docs: sync website-docs, homepage and changelog for v0.8.2 (#3632) 2026-09-24 11:26:34 +08:00