Re: How to create complex gin index in postgres db using django

2018-08-29 Thread Jason
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(

How to create complex gin index in postgres db using django

2018-08-29 Thread Максим Родин
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