Using opclasses in GinIndex in django is throwing this error TypeError: __init__() got an unexpected keyword argument 'opclasses'

I am trying to use indexing for using icontain lookup in query, have come across many answers in stackoverflow only which suggests to use GinIndex these are the stackoverflow answers I was looking to

I was trying answer 6 in the above link but it is throwing this error :

  File "/home/salvi.rawat/venv/transcend/store/models.py", line 53, in Meta
GinIndex(fields=['name'], opclasses=['gin_trgm_ops'])

ERROR:

TypeError: __init__() got an unexpected keyword argument 'opclasses'

I am using django version 1.11 maybe that could be the reason, but need help in this case. thankyou.

Back to Top