FluxyChat

Core SDK

Search

Full-text and hybrid semantic message search via REST.

Search

Search room history with GET /search/messages (FTS5-backed). When semantic search is enabled for your tenant, use hybrid mode for embedding + keyword results.

const { results } = await client.searchMessages("deployment rollback", {
  roomId: "engineering",
  limit: 20,
  mode: "hybrid", // "fts" | "semantic" | "hybrid"
});

for (const hit of results) {
  console.log(hit.snippet, hit.roomId, hit.createdAt);
}

Semantic search (hybrid)

Per-tenant toggle in the dashboard at Settings → Search (/settings/search).

StepAction
1Worker: SEMANTIC_SEARCH_ENABLED=true + embeddings provider (AI_EMBEDDINGS_*)
2Apply migration 0164_semantic_search_settings.sql
3Dashboard: enable semantic search → Run backfill
4Search on /search or the room Search panel in chat

SDK helpers:

await client.getSemanticSearchSettings();
await client.backfillMessageEmbeddings({ roomId: "general" });
const { results } = await client.searchMessagesSemantic("onboarding flow", { roomId: "support" });

Query parameters

ParamDescription
qSearch string (required)
roomIdLimit to one room
from / toISO date range
limitMax hits (default 20, max 50)

Requires member JWT with access to the scoped rooms.

UI pattern

Debounce input, show snippets from hit.snippet, deep-link to /rooms/{roomId}?message={id} in your app router.

See API ReferenceSearch.

On this page