diff --git a/apps/product/models.py b/apps/product/models.py index 0c19b01e..ba9ccd38 100644 --- a/apps/product/models.py +++ b/apps/product/models.py @@ -79,8 +79,8 @@ class ProductQuerySet(models.QuerySet): return self.select_related('product_type', 'establishment') \ .prefetch_related('product_type__subtypes') - def with_es_related(self): - """Returns qs with related for ES indexing.""" + def with_extended_related(self): + """Returns qs with almost all related objects.""" return self.with_base_related() \ .prefetch_related('tags', 'standards', 'classifications', 'classifications__standard', 'classifications__classification_type', 'classifications__tags') \ diff --git a/apps/search_indexes/documents/product.py b/apps/search_indexes/documents/product.py index 4852e0e6..b00f3f50 100644 --- a/apps/search_indexes/documents/product.py +++ b/apps/search_indexes/documents/product.py @@ -113,4 +113,4 @@ class ProductDocument(Document): related_models = [models.ProductType] def get_queryset(self): - return super().get_queryset().published().with_es_related() + return super().get_queryset().published().with_base_related()