Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

554
Views
Fulltext search using Sequelize (Postgres)

So I've been working with sequelize for a while now, and after juggling with elasticsearch, I decided to make use of postgres's support for fts.

It looks like just at the start of this year sequelize added support for TSVector which is necessary for FTS implementation. Although I just can't find any documentation whatsover anywhere.

The pull request

All help is appreciated!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you look at changes for the PR you will see new operator Op.match and the new data type DateTypes.TSVECTOR. You can now define a field like this in a model:

...
textField: {
   type: DataTypes.TSVECTOR
}
...

And you simply can use it like this in where option:

textField: {
  [Op.match]: Sequelize.fn('to_tsquery', 'fat & rat') // match text search for strings 'fat' and 'rat' (PG only)
}

See this readme

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!