Overview
Returns state and asearch 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. Callsearch 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.
string
Scope results to a specific conversation.
number
Maximum number of results to return.
string
Resolves the embedded author reputation on each matched record into a
spaceReputation number. Accepts a space <uuid>, "none" (project-general bucket), or "context" (server-derived from the request context). Empty string, "general", and null are rejected. See Reputation.boolean
When
true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <uuid>.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.(props: UseSearchContentProps) => Promise<void>
Executes the search and updates
results.() => void
Clears
results and error.
