Skip to content

Commit 8bb3f51

Browse files
os-zhuangclaude
andauthored
docs(search): pinyin recall — spell out sys_user/picker coverage and existing-row backfill (#3057)
Answers the two questions the merged docs left open (#2486): whether the people picker (sys_user) is covered automatically (yes — verified against a live showcase: sign-up, admin rename, and engine writes are all searchable immediately), and how pre-existing rows get their companion value (automatic paged backfill on the first boot after the switch turns on; rebuildSearchCompanion for hook-bypassing bulk imports). Refs #2486 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMugRriiNv3nsnmLczfhuY
1 parent d9d372c commit 8bb3f51

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

content/docs/data-modeling/queries.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,17 @@ the expanded filter; `fields` semantics, `searchableFields`, and drivers are unc
380380
(ADR-0097). Relevance ranking and typo tolerance remain Tier-2 (native FTS) and are not
381381
part of this.
382382

383+
**Coverage** — every object with a resolvable display/name field gets the companion,
384+
**including `sys_user`**: the people picker (which sends a plain `$search` against
385+
`sys_user`) finds users by pinyin with zero per-object or per-field configuration. Users
386+
created through any write path — sign-up, admin rename, engine writes — are searchable
387+
immediately.
388+
389+
**Pre-existing rows** are reconciled automatically: the first boot after the switch turns
390+
on runs a paged, idempotent backfill over every object that carries the companion column.
391+
For bulk imports that bypassed write hooks at runtime, `rebuildSearchCompanion` (exported
392+
by `@objectstack/plugin-pinyin-search`) recomputes the column on demand.
393+
383394
---
384395

385396
## Window Functions

content/docs/deployment/environment-variables.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ OS_SEARCH_PINYIN_ENABLED=false os start # force off (e.g. a zh-locale stack th
253253
|:---|:---|:---|:---|
254254
| `OS_SEARCH_PINYIN_ENABLED` | boolean | locale-derived | Pinyin search recall. When unset, the default derives from the stack's configured locales (`i18n.defaultLocale` / `supportedLocales` / `fallbackLocale`): any `zh-*` locale turns it on; an explicit value always wins. Gates both the compile-time `__search` companion column and the `plugin-pinyin-search` populate hooks, so there is no half-state. Off ⇒ no extra column, and `pinyin-pro` is never loaded. |
255255

256+
Coverage includes `sys_user` — the people picker finds users by pinyin with no
257+
per-object configuration. Rows that predate the switch are backfilled automatically
258+
on the first boot after it turns on (paged, idempotent); for runtime bulk imports
259+
that bypassed write hooks, `rebuildSearchCompanion` (from
260+
`@objectstack/plugin-pinyin-search`) recomputes the column on demand. See
261+
[Queries → Pinyin recall](/docs/data-modeling/queries#pinyin-recall-chinese-deployments).
262+
256263
---
257264

258265
## Marketplace & Metadata

0 commit comments

Comments
 (0)