diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-12 13:02:59 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-12 13:02:59 +0200 | 
| commit | a2ae7228cae62c4fde1f9554372162d322e69aa9 (patch) | |
| tree | 38f7b144f2083901d073dbc3a7c646f70f9e7096 /archaeological_operations/models.py | |
| parent | 81fc327fd0eb353fbf82dd17e23682750ad3d4c2 (diff) | |
| download | Ishtar-a2ae7228cae62c4fde1f9554372162d322e69aa9.tar.bz2 Ishtar-a2ae7228cae62c4fde1f9554372162d322e69aa9.zip | |
Manage postgres index and vector searches (refs #2912)
Diffstat (limited to 'archaeological_operations/models.py')
| -rw-r--r-- | archaeological_operations/models.py | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 54ed96cec..d55a2e689 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -248,6 +248,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,          'archaeological_sites__reference': _(u"Archaeological sites ("                                               u"reference)"),      } +    BASE_SEARCH_VECTORS = ["scientist__raw_name", "cached_label", +                           "common_name", "comment", "address", "old_code"] +    INT_SEARCH_VECTORS = ["year"] +    M2M_SEARCH_VECTORS = ["towns__name"]      # fields definition      creation_date = models.DateField(_(u"Creation date"), @@ -309,6 +313,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,          code_patriarche = models.TextField(u"Code PATRIARCHE", null=True,                                             blank=True, unique=True)          TABLE_COLS = ['full_code_patriarche'] + TABLE_COLS +        BASE_SEARCH_VECTORS = ['code_patriarche'] + BASE_SEARCH_VECTORS          # preventive          fnap_financing = models.FloatField(u"Financement FNAP (%)",                                             blank=True, null=True) | 
