Search is here! Convex’s full text search makes adding search to your app a breeze.
The full list of features in this releases is:
- Full Text Search (BETA)
- Open Source Python Client
Details below. Let us know what you think in Discord!
Full Text Search (BETA)
Full text search allows you to find Convex documents that match keywords.
Unlike normal database queries, search queries look within a string field to find the keywords. This can be used to build search features within your app like searching for messages that contain a set of words.
To use full text search, first add a search index to your schema in
Then, you can query this index to find matching documents:
const messages = await db .query("messages") .withSearchIndex("search_body", q => q.search("body", "hello hi")) .collect();
This query tells Convex to find documents in the
messages table where the
body field contains the words
"hi", or both.
Convex search queries are consistent and transactional, meaning a search query is never stale and always represents the latest state of the database. You can even run a search query in the middle of a mutation and observe the latest transaction state, just like regular database read operations!
To learn more about full text search, check out the docs.
Full text search is a beta feature. If you have feedback or feature requests, let us know in Discord!