you need to make a migration to apply the index.
https://www.endpoint.com/blog/2016/09/17/executing-custom-sql-in-django-migration
something like
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.RunSQL(
Hello,
I'm trying to make the text search index like this:
https://www.postgresql.org/docs/current/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX:
"CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', title ||
' ' || body));"
I cannot imagine how to do it in django
Here is my
2 matches
Mail list logo