Created
December 9, 2019 19:10
-
-
Save foxcarlos/911ad676bf3b288ed710345ac1b8820a to your computer and use it in GitHub Desktop.
SQL Full Text Search PostgreSQL
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
sql = "select * from directory_telephone where to_tsvector(name) @@ to_tsquery('farmacia | norte');" | |
self._cr.execute(sql) | |
self._cr.fetchall() | |
# select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('farmacia | norte'); | |
# select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('farmacia & norte'); | |
# select * from public.directory_telephone where to_tsvector(street) @@ to_tsquery('farmacia | norte'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment