Pg Full Text search in the ORM

9 views
Skip to first unread message

Stats Student

unread,
Feb 24, 2021, 7:43:46 PM2/24/21
to django...@googlegroups.com
Hi, does anyone know how to translate the following query to the ORM?

select * from company where to_tsvector(name) @@ to_tsquery('gold:*')

So far I have the following, but cannot seem to integrate the [:*] piece.

Company.objects.annotate(search = SearchVector('name')).filter(search = SearchQuery('gold'))


TIA


Reply all
Reply to author
Forward
0 new messages