TL;DR: Your managed backend ships with pgvector and managed embeddings. Add a vector(1536) column, embed your text with client.vector.embed(text) and store it, then search by meaning with client.search.text(...) (full-text), client.vector.search(...) (pure vector), or client.search.hybrid(...) (full-text + vector fused). No external vector DB, no embedding API key to manage.
Keyword search (LIKE '%cat%') finds the word "cat"; it doesn't find "kitten" or "feline." Semantic search does, because it compares meaning — encoded as a vector — instead of characters. The catch has always been the plumbing: an embedding model, somewhere to store the vectors, and a similarity query. A LingCode Cloud backend includes all three, so "search my notes by meaning" is a few lines, not a new service.
This assumes a connected managed backend. The honest fastest path: tell the agent "add semantic search over my notes" and it will add the column, embed on insert, and wire the query. This tutorial explains the moving parts so you know what it built.
Embeddings are arrays of numbers stored in a vector(N) column (N = the model's dimension; the built-in embeddings are 1536-dim). Ask the agent, or run a migration from the console SQL tab:
ALTER TABLE notes ADD COLUMN embedding vector(1536);
Managed embeddings mean you don't bring an embedding API key. When you create or edit a row, embed its text and save the vector:
const { data } = await client.vector.embed(note.body); // → { embedding: [...] }
await client.from('notes').eq('id', note.id).update({ embedding: data.embedding });
Full-text needs no embedding:
const { data } = await client.search.text({ table: 'notes', column: 'body', query: 'budget planning' });
Hybrid embeds the query, then fuses keyword + vector ranking:
const { embedding } = (await client.vector.embed('how do I save money')).data;
const { data } = await client.search.hybrid({
table: 'notes', text_column: 'body', vector_column: 'embedding',
query: 'how do I save money', embedding,
});
Results come back ranked, and (for the tenant-scoped data API) only include rows the signed-in user is allowed to see — your RLS policies still apply.
In lingcode.dev/backends → Database, open a table and click Search. Type a query, pick Full-text or Hybrid, and the console embeds it for you and shows the ranked rows — a quick way to sanity-check relevance before wiring it into the app.
For larger tables, add an index so vector search doesn't scan every row, and a generated tsvector column for full-text. The agent will add these when you mention scale; the gist is an HNSW/IVF index on the vector column and a GIN index on the text. Until then, on modest data it's already plenty quick.