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 | 0c75a8c1300338ce0a03d3a1bb57959f48eaaf1a (patch) | |
tree | 38f7b144f2083901d073dbc3a7c646f70f9e7096 /archaeological_operations/models.py | |
parent | 7225e1fa34d36c687e66ac892bd41138ff91349d (diff) | |
download | Ishtar-0c75a8c1300338ce0a03d3a1bb57959f48eaaf1a.tar.bz2 Ishtar-0c75a8c1300338ce0a03d3a1bb57959f48eaaf1a.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) |