Tech Insights
When doing a FTS remember to cast the expression to text, e.g. `queryset.annotate(casted_field=Cast('field', TextField())).an...
When doing a FTS remember to cast the expression to text, e.g. queryset.annotate(casted_field=Cast('field', TextField())).annotate(vector=SearchVector('casted_field')).filter(vector=value). This allows even UUID fields to be searchable.
Shared by
- Django
- Full Text Search



