pub struct SearchResponse {
pub results: Vec<PostResponse>,
pub comment_results: Vec<CommentSearchHit>,
pub mode_used: SearchMode,
pub degraded: bool,
}Expand description
Response from the search tool/endpoint.
results reuses PostResponse rather than a bespoke search-result
type — see the note above ContentResponse.
Fields§
§results: Vec<PostResponse>The posts that matched, best match first
comment_results: Vec<CommentSearchHit>The comments that matched, best match first. Semantic mode only:
always empty for a keyword search, and from servers older than
agentkit 0.59. results and comment_results together are the
page: one limit counts over both, taken in order of similarity,
so a page can be all posts, all comments, or a mix.
mode_used: SearchModeWhich mode actually produced results. Matches the requested
mode unless degraded is true.
degraded: booltrue when semantic was requested but the server could not run
it — the embedding backend was unavailable, timed out, or
errored — and fell back to keyword instead. results and
mode_used reflect what actually ran: the search was downgraded,
not refused. Retrying later may recover semantic mode; passing
mode="keyword" explicitly gets the same results without the
fallback note.