diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-12 15:36:29 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-12 15:36:29 +0200 |
commit | 88f2d0dc710674aa5017271b1d558a1da2ecdd1e (patch) | |
tree | e536f9e5d3f8fd59e68b26e3c8166f5ec55674d9 | |
parent | 74ede4d3b306ac49052ee1a91737068f5da7a89b (diff) | |
download | Ishtar-88f2d0dc710674aa5017271b1d558a1da2ecdd1e.tar.bz2 Ishtar-88f2d0dc710674aa5017271b1d558a1da2ecdd1e.zip |
basic vector search parameters (refs #2912)
-rw-r--r-- | archaeological_context_records/models.py | 6 | ||||
-rw-r--r-- | archaeological_finds/models_finds.py | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 9162a8aa0..a8517ed26 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -304,6 +304,12 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, polygon = models.PolygonField(_(u"Polygon"), blank=True, null=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True, db_index=True) + PARENT_SEARCH_VECTORS = ['operation'] + BASE_SEARCH_VECTORS = ["cached_label", "label", "location", + "interpretation", "filling", "datings_comment", + "identification__label", "activity__label", + "excavation_technic__label"] + M2M_SEARCH_VECTORS = ["datings__period__label"] history = HistoricalRecords() class Meta: diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 966dd1065..96c21e79e 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -239,6 +239,9 @@ class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms): history = HistoricalRecords() RELATED_POST_PROCESS = ['find'] CACHED_LABELS = ['cache_short_id', 'cache_complete_id'] + PARENT_SEARCH_VECTORS = ['context_record'] + BASE_SEARCH_VECTORS = ["cached_label", "label", "description", + "comment", "cache_short_id", "cache_complete_id"] class Meta: verbose_name = _(u"Base find") @@ -752,6 +755,14 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel, db_index=True) history = HistoricalRecords() BASKET_MODEL = FindBasket + PARENT_SEARCH_VECTORS = ['base_finds'] + BASE_SEARCH_VECTORS = [ + "cached_label", "label", "description", "container__location__name", + "container__reference", "mark", "comment", "dating_comment", + "previous_id"] + M2M_SEARCH_VECTORS = [ + "datings__period__label", "object_types__label", "integrities__label", + "remarkabilities__label", "material_types__label"] class Meta: verbose_name = _(u"Find") |