diff options
| -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") | 
