How to define schemas (any dialect) with full text search column types?

The Drizzle docs clearly show an example of using full text search in where queries using the sql() syntax in the sql in where documentation. Given this one would assume there is a way to define your schema to include both the appropriate column type (e.g. ts_vector Postgresql, FULLTEXT MySQL, etc.) and indexes for those columns. However there doesn't seem to be any documentation of this or indication that it is on their radar. I understand that there are issues open for these things like Add Full-Text Search capability and workarounds like https://github.com/drizzle-team/drizzle-orm/issues/247#issuecomment-1726743672. How are people here implementing this kind of thing themselves?
GitHub
Add Full-Text Search capability · Issue #247 · drizzle-team/drizzle...
This is a feature request for Full-Text Search functionality to perform a fulltext search on specific fields. Ideally with support for using GIN/GIST indexes to speed up full text search.
Drizzle ORM - next gen TypeScript ORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
2 Replies
Titan
Titan6mo ago
did you find an answer to this?
Bradley
BradleyOP5mo ago
@Titan , hopefully you saw this announcement https://orm.drizzle.team/learn/guides/postgresql-full-text-search However, I'm having errors every time I want to push new DB changes....so there's that.
Drizzle ORM - PostgreSQL full-text search
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Want results from more Discord servers?
Add your server