Created
February 4, 2021 00:27
-
-
Save montanalow/982cd01a8025fda40c2813066e2bcf9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE products | |
ADD COLUMN keywords tsvector -- the text search indexable data type | |
GENERATE ALWAYS AS ( | |
set_weight(to_tsvector(name), 'A') || | |
set_weight(to_tsvector(description), 'B') | |
) STORED; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment