diff options
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/archaeological_files/models.py b/archaeological_files/models.py index dbb02f509..018b5d429 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -22,6 +22,7 @@ from collections import OrderedDict  from django.conf import settings  from django.contrib.gis.db import models +from django.contrib.postgres.indexes import GinIndex  from django.core.cache import cache  from django.db.models import Q, Count, Sum  from django.db.models.signals import post_save, m2m_changed, post_delete @@ -374,6 +375,9 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter,              ("close_file", u"Can close File"),          )          ordering = ('cached_label',) +        indexes = [ +            GinIndex(fields=['data']), +        ]      @classmethod      def _get_department_code(cls, value): | 
