Search content, users, and spaces with natural language queries
Sublay provides three semantic search hooks — one for content (entities, comments, messages), one for users, and one for spaces. All three return results ranked by semantic similarity to the query.
useSearchContent
Search across entities, comments, and chat messages. You can filter by sourceTypes to target only specific content types, or scope results to a specific space or conversation.
Limit results to specific content types. Defaults to all types.
string
Scope results to a specific space.
boolean
default:"false"
Only applies with spaceId. When true, results also cover every space nested under it — the whole subtree at any depth — not just the named space. Ignored without spaceId.
string
Scope results to a specific conversation (for messages).
number
Maximum number of results to return.
Returns
ContentSearchResult[]
Ranked results.
Show ContentSearchResult properties
"entity" | "comment" | "message"
The type of the matched record.
number
Cosine similarity score (0–1). Higher is more similar.
Entity | Comment | ChatMessage
The full matched record.
Content by users the signed-in user is block-edged with, comments on an entity whose author has blocked them, and comments their author deleted or a moderator removed, are left out.