#partial string matching
1 messages · Page 1 of 1 (latest)
Hi @cosmic condor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Convex does not support wildcard or partial string matching (like SQL's LIKE "%text%") in its standard filter or equality queries. The .filter method only supports exact equality and basic comparisons, not substring or pattern matching within strings.
For partial string matching, Convex provides full text search via search indexes. Full text search allows you to find documents where a string field contains words that match your query. However, Convex's full text search is designed for prefix matching on words, not arbitrary substring matching. For example, searching for "app" will match "apple" but not "grape" (even though "app" is in "grape")—it only matches the start of words, not inside them. Mid-word matching (true wildcards) is not supported, and this is a deliberate design choice for performance reasons. There are no current plans to extend this to match inside words, and this limitation is discussed in community threads as well. If you need to match inside words, you would have to scan and filter data in TypeScript, which is inefficient for large tables, or use an external search service like Algolia if you need more advanced search capabilities, though that may be overkill for many use cases Full Text Search is there a filter in convex dashboard like contains?.
In summary:
- No, you cannot use wildcards or partial string matching in standard filters.
- Full text search supports prefix matching on words, not arbitrary wildcards or mid-word matching.
- For more advanced search, consider external solutions or filtering in TypeScript for small datasets.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@cosmic condor Kapa.ai is still learning and improving, please let me know how I did by reacting below.