diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-09 17:50:00 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-13 18:26:04 +0200 |
commit | 03452f53b22c55c0b527d76433dbbd7dc52fe6dc (patch) | |
tree | 9fc8f7a188e54dd18f5be1054ea442389ae0ee38 /archaeological_operations/models.py | |
parent | a9597946a8c9a1a7de2c590ef0b87d2949994920 (diff) | |
download | Ishtar-03452f53b22c55c0b527d76433dbbd7dc52fe6dc.tar.bz2 Ishtar-03452f53b22c55c0b527d76433dbbd7dc52fe6dc.zip |
search vector update: prevent circular referencing
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 035235b51..f09184a32 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -101,12 +101,21 @@ class ArchaeologicalSite(BaseHistorizedItem): SHOW_URL = 'show-site' TABLE_COLS = ['reference', 'name', 'towns', 'periods', 'remains'] SLUG = 'site' + BASE_SEARCH_VECTORS = [ - "reference", "name", "oceanographic_service_localisation", - "shipwreck_code", "comment", "shipwreck_name", "discovery_area", + "comment", + "discovery_area", + "locality_cadastral", + "locality_ngi", + "name", + "oceanographic_service_localisation", + "reference", + "shipwreck_code", + "shipwreck_name", ] M2M_SEARCH_VECTORS = ["periods__label", "remains__label", "towns__name"] PARENT_SEARCH_VECTORS = ['operations'] + reference = models.CharField(_(u"Reference"), max_length=200, unique=True) name = models.CharField(_(u"Name"), max_length=200, null=True, blank=True) @@ -354,12 +363,26 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, u"reference)"), } BASE_SEARCH_VECTORS = [ - "scientist__raw_name", "cached_label", "common_name", "comment", - "address", "old_code", "seizure_name", "official_report_number", - "name_of_the_protagonist" + "abstract", + "address", + "code_patriarche", + "comment", + "common_name", + "in_charge__cached_label", + "name_of_the_protagonist", + "official_report_number", + "old_code", + "operation_type__label", + "operator_reference", + "operator__cached_label", + "scientist__cached_label", + "scientific_documentation_comment", + "seizure_name", ] INT_SEARCH_VECTORS = ["year"] - M2M_SEARCH_VECTORS = ["towns__name"] + M2M_SEARCH_VECTORS = ["periods__label", "remains__label", "towns__name"] + PARENT_SEARCH_VECTORS = ["associated_file"] + PARENT_ONLY_SEARCH_VECTORS = ["archaeological_sites"] ASSOCIATED = { "scientist": { ('person_types', PersonType): ( |