Skip to content

feat(tsvector): TSVECTOR support - #12955

Merged
papb merged 7 commits into
mainfrom
rebased-pr-12631
Jan 27, 2021
Merged

papb merged 7 commits into
mainfrom
rebased-pr-12631

Conversation

@papb

@papb papb commented Jan 18, 2021

Copy link
Copy Markdown
Member

This is PR #12631 rebased on top of the new main branch.

@papb papb mentioned this pull request Jan 18, 2021
2 of 6 tasks
@papb
papb force-pushed the rebased-pr-12631 branch from e3bdbcf to 98ddcae Compare January 18, 2021 04:40
@papb

papb commented Jan 18, 2021

Copy link
Copy Markdown
Member Author

@djake This might interest you

@djake djake left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! (Aside from the linting.)

@papb
papb force-pushed the rebased-pr-12631 branch 2 times, most recently from 22781da to 6820052 Compare January 20, 2021 01:55
@papb
papb force-pushed the rebased-pr-12631 branch from 6820052 to 90885c3 Compare January 27, 2021 03:30
@papb
papb merged commit e45df29 into main Jan 27, 2021
@papb
papb deleted the rebased-pr-12631 branch January 27, 2021 03:37
@papb papb mentioned this pull request Jan 27, 2021
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@d4mr

d4mr commented Jul 8, 2021

Copy link
Copy Markdown

Is there any documentation about this yet?

vikasg603 added a commit to vikasg603/sequelize that referenced this pull request Sep 6, 2021
resolved the typescript issue for Op.match (sequelize#12955)
sdepold added a commit that referenced this pull request Nov 15, 2021
* Update operators.d.ts

resolved the typescript issue for Op.match (#12955)

* Update operators.d.ts

Co-authored-by: Constantin Metz <[email protected]>
Co-authored-by: Sascha Depold <[email protected]>
@harrysayers

Copy link
Copy Markdown

Hey, is there any documentation on how to use this for full-text search? Seen a couple of suggestions on stack overflow but seem to get an error with suggested implementation.

@djake

djake commented Apr 14, 2022

Copy link
Copy Markdown

Hi @harrysayers -

The basic gist is that in your model you can define a column type of Sequelize.TSVECTOR and then in your queries you can use Op.match to generate sql with the @@ operator.

Some of these tests might help clarify:
https://github.com/sequelize/sequelize/pull/12955/files#diff-5280f27cbb66e3fc301f4b0a9dfb32a27b81f573ec83182308e604efe40a64c4R1209

https://github.com/sequelize/sequelize/pull/12955/files#diff-9c13a4531a21ff7baa256c04f3661a1a466c0f1332f91ac221d863d5c1a0a57fR279

I haven't worked on this in a while so perhaps I'm forgetting something. Might be worth opening a new issue requesting documentation.

@harrysayers

Copy link
Copy Markdown

Hi @djake

Thanks for the reply.

I think I'm doing what you're suggesting - I made a new column in my model called 'searchUser' of type Sequelize.TSVECTOR and then querying searchUser column with Op.match to search all users (I'm assuming this will take into account all columns in model).

Will open new issue requesting documentation.

aliatsis pushed a commit to creditiq/sequelize that referenced this pull request Jun 2, 2022
…quelize#13481)

* Update operators.d.ts

resolved the typescript issue for Op.match (sequelize#12955)

* Update operators.d.ts

Co-authored-by: Constantin Metz <[email protected]>
Co-authored-by: Sascha Depold <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants