Skip to main content

Overview

Returns state and a match function for ranking users by activity-derived interest facets. In passive mode it matches against the current user’s own facets (“who is like me?”); in directed mode it matches against a free-text topic (“who is into biotech?”). For setup and the underlying model, see the Interest Matching guide.

Usage Example

Parameters

Call match with:
mode
'passive' | 'directed'
required
"passive" matches against the current user’s facets; "directed" matches against query.
query
string
The free-text topic to match against. Required in directed mode; must be non-empty (a blank directed query is a no-op). Not used in passive mode.
limit
number
Maximum number of matched users (max 50).
spaceId
string
Restrict candidates to users active in this space.
includeChildSpaces
boolean
With spaceId, also include users active in the space’s subtree.
includeSampleContent
boolean
Request illustrative sample content per matched facet (only honored when the project has exposeSampleContent enabled).
excludeSelf
boolean
Exclude the current user from results. Defaults to true server-side.

Returns

results
UserMatchResult[]
Ranked matches (descending by score).
loading
boolean
true while a match is in progress.
error
string | null
Error message if the last match failed.
match
(props) => Promise<void>
Executes the match and updates results.
reset
() => void
Clears results and error.