Skip to main content
For text search (titles, descriptions, comments) where keyword match matters more than semantic similarity, use Convex’s full-text search.

Setup

1. Add a search index

convex/schema.ts

2. Query

convex/tasks.ts

How it ranks

Convex uses a BM25-derived scoring algorithm — more matches in the search field rank higher; rarer words get more weight than common ones. For semantic similarity (find similar items, not just keyword matches), use vector search.

Limits

  • One search field per index. To search both title and body, either index a concatenated field or maintain two search indexes.
  • Filter fields combined with search support up to 16 fields.

Tips

Search a concatenated field for “search across multiple columns.” Add a searchableText field that’s title + " " + body + " " + tags.join(" "), populate it on every write.
For autocomplete UIs, debounce the client. A keystroke-by-keystroke search is wasteful; 200ms debounce is plenty.

Vector search

Semantic alternative.

Algolia

Hosted search with more features.

Schema

Search index syntax.
Last modified on April 18, 2026