Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tsvector): TSVECTOR support #12955

Merged
merged 7 commits into from Jan 27, 2021
Merged

feat(tsvector): TSVECTOR support #12955

merged 7 commits into from Jan 27, 2021

Conversation

papb
Copy link
Member

@papb papb commented Jan 18, 2021

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

@papb
Copy link
Member Author

papb commented Jan 18, 2021

@djake This might interest you

Copy link

@djake djake left a comment

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 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
Contributor

🎉 This PR is included in version 6.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

jctaveras pushed a commit to jctaveras/sequelize that referenced this pull request Mar 29, 2021
)

Co-authored-by: Jano Kacer <jan@vestberry.com>
Co-authored-by: Sébastien BRAMILLE <2752200+oktapodia@users.noreply.github.com>
@d4mr
Copy link

d4mr commented Jul 8, 2021

Is there any documentation about this yet?

vikasg603 pushed 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 <58604248+Keimeno@users.noreply.github.com>
Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>
@harrysayers
Copy link

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
Copy link

djake commented Apr 14, 2022

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

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 <58604248+Keimeno@users.noreply.github.com>
Co-authored-by: Sascha Depold <sdepold@users.noreply.github.com>
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.

None yet

6 participants