pg-search-sequelize (v0.0.10) provides PostgreSQL full-text search in Node.js using Sequelize as the ORM. It automatically creates materialized views that combine searchable fields into ts_vector columns and adds `searchByText`, `search`, and `refresh` class methods to your models. Supports weighted search, filtering, ordering, and inclusion of associated model fields. The package is stable but has not been updated frequently; it requires Sequelize v4 (v5+ compatibility is unclear). Use it if you need simple, model-centric full-text search without raw queries, but be aware of limited maintenance and potential migration issues with newer Sequelize versions.
npm install pg-search-sequelizeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a Film model, wraps it with SearchModel, creates a materialized view with weighted fields, and performs a full-text search with ordering.
Use const SearchModel = require('pg-search-sequelize');Pin sequelize to v4.x or test thoroughly with newer versions.
Run createMaterializedView() or equivalent migration before searching.
Consider using raw SQL with Sequelize's query method or migrate to Sequelize's built-in search (e.g., Op.like or full-text extensions).
Run 'npm install pg-search-sequelize' and ensure the require path is correct.
Use 'const SearchModel = require('pg-search-sequelize');'.Call 'createMaterializedView()' as part of migration or setup script.
Ensure createMaterializedView is called correctly with fields and weights options; check that the view was created with the proper columns.