-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VectorField has db_index=True sometimes resulting in "index row size XXXX exceeds maximum 2712" #45
Comments
I'm experiencing the same issue. What I've done is implemented my own "VectorField" with from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.RunSQL(
"CREATE INDEX tablename_searchidx ON tablename USING gin(search_index);",
),
] |
Here's a pull request that simply does NOT set db_index, leaving it to the user to decide: #46 |
Hey folks, new maintainer here. So we've gone ahead updated the VectorField to support We'll definately want to update the code so when |
@linuxlewis Why the 0.10 on pypi has brought |
Regarding the 0.10 on pypi, please note 0.10 is older than 0.9.X. It should probably have been 0.1.0::
Also note that since Django 1.10 there is this which may be helpful: https://docs.djangoproject.com/en/1.10/ref/contrib/postgres/search/#django.contrib.postgres.search.SearchVectorField |
This is definitely related to #18
In testing with a bunch of sample documents and converting their contents with
to_tsvector()
into aVectorField
I saw the following error:db_index=True in the VectorField class results in Django trying to create a "normal" index on the tsvector, instead of GIN or GIST.
Suggestions for work-arounds are most welcome!
The text was updated successfully, but these errors were encountered: