跳到主要内容

ResolveScopeInput

Defined in: packages/rxdb-plugin-search/src/core/scope-resolver.ts:13

解析参与聚合的 collection 范围。

优先级(自上而下,逐级求交集):

  1. candidates:拥有 searchable 字段(已通过 schema 校验)的 collection 名集合
  2. excludedCollections:插件级全局排除(SearchPluginOptions.excludedCollections
  3. requested:单次调用 SearchOptions.collections 显式 allowlist;未传时等价 1∩2

该函数为纯逻辑(无副作用、无 DB 访问),便于单测覆盖与运行时复用。

Properties

candidates

readonly candidates: readonly string[];

Defined in: packages/rxdb-plugin-search/src/core/scope-resolver.ts:14


excludedCollections?

readonly optional excludedCollections?: readonly string[];

Defined in: packages/rxdb-plugin-search/src/core/scope-resolver.ts:15


requested?

readonly optional requested?: readonly string[];

Defined in: packages/rxdb-plugin-search/src/core/scope-resolver.ts:16