Extensible Search Entity Registry

Register new searchable entity types at boot with validated table, column, ranking, facet, and ownership descriptors.

Overview

Description

The Extensible Search Entity Registry lets a package graduate its own data type into Universal Search without adding a type-name branch to the engine. At boot, the package registers an EntityTypeConfig descriptor that names its table, identifier and content columns, optional Dotabase ownership column, searchable text expression, date fields, ranking expression, metadata projections, and filter support. Retrieval then fans out over the live registry.

Descriptors are normalized and validated before use. SQL identifiers and expressions must satisfy the registry's safety rules, duplicate registrations are rejected unless the caller deliberately uses the idempotent boot helper, and unknown requested types raise a named error. The built-in registry is empty by design, keeping search ownership with the packages that know their schema.

Selling Points

  • New knowledge types join the shared search experience through a descriptor instead of a core-engine rewrite.
  • Package ownership stays explicit: the schema-owning package decides how its records are searched and projected.
  • Validation catches unsafe identifiers and incomplete descriptor combinations before they reach generated SQL.
  • An empty built-in catalog prevents stale central lists from claiming support that a composition root did not wire.
  • The same registration automatically participates in hybrid retrieval, access narrowing, facets, sorting, and response normalization where configured.

User Story

A module team ships a new workspace entity with searchable title and body fields. In its composition registration, it supplies an entity descriptor and calls the idempotent boot helper. The type becomes available to Universal Search and scoped API callers without adding a switch case to the search pipeline or copying ranking behavior.

Extension Surface

Pluggable is the first true rung because packages/search/src/internal/registry/entity-types.ts exposes the formal registerEntityType and registerEntityTypeIdempotent registration points. The contract in packages/search/src/internal/types.ts is data-driven and consumed generically by retrieval. Registration is operator/composition scoped rather than tenant-authored at runtime.

Capabilities & Limits

  • Registers table, columns, rank, metadata, ownership, facet, and date-sort behavior for a type.
  • Lists and resolves the active descriptors used by retrieval and scope validation.
  • Supports safe idempotent composition when multiple runtime assembly paths initialize the same descriptor.
  • Limits: a descriptor must map to the engine's supported SQL and projection vocabulary; arbitrary retrieval code is not registered.
  • Limits: adding a type does not create its UI renderer or permissions model; those remain responsibilities of the owning package and access plane.

Implementation Map

  • packages/search/src/internal/registry/entity-types.ts
  • packages/search/src/internal/types.ts
  • EntityTypeConfig
  • packages/search/src/internal/stages/retrieve.ts
  • packages/search/src/internal/errors.ts
  • apps/web/src/composition/runtime.ts

Properties

Property
Value
product
dots-platform
extensibility
pluggable
module
Search, SDK
packages
search
status
shipped
surface
api
summary
Register new searchable entity types at boot with validated table, column, ranking, facet, and ownership descriptors.

Connections

Extensible Search Entity Registry · Explore connections

  • complementstoHeadless Hybrid Search Pipeline
  • implemented bytoregisterEntityType
  • implemented bytoEntityTypeConfig
  • implemented bytopackages/search/src/internal/registry/entity-types.ts
  • implemented bytopackages/search/src/internal/types.ts
  • implemented bytopackages/search/src/internal/stages/retrieve.ts
  • requiresfromHeadless Hybrid Search Pipeline

Connected Records7

Complements
Implemented by
EntityTypeConfig
packages/search/src/internal/registry/entity-types.ts
packages/search/src/internal/stages/retrieve.ts
packages/search/src/internal/types.ts
registerEntityType
Requires
7 connections.