Find records and events
const matches = await db.from("todos").textSearch("title", "nostr app");
const cached = await db.from("todos").textSearch("title", "nostr").local();
const notes = await db.events.search("nostr", { kinds: [1], limit: 20 });
Table text search checks a string field after version resolution. It ignores case and accents and requires each space-separated word to occur as a substring. It does not provide stemming, ranking, phrase syntax, or a full-text index. Private table search runs after decryption.
events.search() sends the NIP-50 search filter to relays. Results are signed raw Nostr events, not table rows. Each relay controls support and matching rules. A relay can ignore the filter, return no matches, or reject it. The SDK cannot guarantee relevance across relays. Raw search can return old record versions; use table queries for canonical state.