Skip to main content

Overview

Returns state and a search function for executing natural language searches over project content. Supports filtering by content type and scoping by space or conversation. For integration guidance, see Semantic Search.

Usage Example

Parameters

This hook returns an object. Call search with:
query
string
required
The natural language query string.
sourceTypes
("entity" | "comment" | "message")[]
Limit results to specific content types. Omit to search all types.
spaceId
string
Scope results to a specific space.
includeChildSpaces
boolean
default:"false"
Only applies with spaceId. When true, results also cover every space nested under it — children, grandchildren, the whole subtree at any depth — not just the named space. Ignored without spaceId.
conversationId
string
Scope results to a specific conversation.
limit
number
Maximum number of results to return.

Returns

results
ContentSearchResult[]
Ranked search results.
loading
boolean
true while a search request is in progress.
error
string | null
Error message if the last search failed, otherwise null.
Executes the search and updates results.
reset
() => void
Clears results and error.