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:
string
required
The natural language query string.
("entity" | "comment" | "message")[]
Limit results to specific content types. Omit to search 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 — children, grandchildren, the whole subtree at any depth — not just the named space. Ignored without spaceId.
string
Scope results to a specific conversation.
number
Maximum number of results to return.

Returns

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