Native grep-ai search

○ planned

Search across your schema and data by intent, not only by the exact SQL words you happen to remember.

You should be able to search for the idea in your head, not only the exact table name you happen to remember. Semantic search finds the relevant table, column, or routine from a description - “where do we keep cancelled subscriptions” - rather than requiring you to already know the answer.

Why plain search is not enough

Text search fails in both directions. Search customer in a schema that calls it party and you get nothing; search date and you get four hundred columns. Neither result tells you where the thing you want lives.

How it works: two searches, merged

SQLly keeps a local catalog of your schema objects and searches it two ways at once:

  • Full-text (BM25) - fast, exact, and excellent when you do remember the word. This half already powers schema search today.
  • Vector similarity - embeddings of each object's description, so “cancelled subscriptions” can match a churn_events table that shares no words with your query.

The two score sets are not comparable raw - BM25 scores and cosine similarity live on different scales - so each is normalized independently and then blended, with the two halves weighted roughly equally. Each result carries its score breakdown, so a suspicious hit can be explained rather than defended.

The vector half is optional and local. Embeddings are produced by whichever provider you configured - an on-device model through Ollama or MLX, or nothing at all. With no embedding provider, search stays full-text only rather than degrading into guesswork: hybrid is engaged only when embeddings actually exist.

Searching data, not only schema

The same machinery points at values as well as names - finding which table holds a mystery identifier you pasted in. That part is bounded carefully for the obvious reason: scanning data to answer a search is expensive, and doing it to production without being asked would be rude.

Planned. The catalog, the full-text index, the vector store, and the hybrid merge are built and tested; what remains is the search surface in the app and the data-search bounds.