From d27298e9a6977d4cef53b0bb446560844be1edad Mon Sep 17 00:00:00 2001 From: Troy Sankey Date: Thu, 12 Dec 2024 11:39:33 -0800 Subject: [PATCH] feat: algolia index should be searchable by aggregation_key E.g. I should be able to type "OxfordX+LSC" in algolia and see results. --- enterprise_catalog/apps/catalog/algolia_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/enterprise_catalog/apps/catalog/algolia_utils.py b/enterprise_catalog/apps/catalog/algolia_utils.py index e19bb82f..aae52456 100644 --- a/enterprise_catalog/apps/catalog/algolia_utils.py +++ b/enterprise_catalog/apps/catalog/algolia_utils.py @@ -136,11 +136,14 @@ 'attributeForDistinct': 'aggregation_key', 'distinct': True, 'typoTolerance': False, + # unordered(): Ignores the position of the match within the attribute. + # From docs: https://www.algolia.com/doc/api-reference/api-parameters/searchableAttributes/#modifiers 'searchableAttributes': [ 'unordered(title)', 'unordered(full_description)', 'unordered(short_description)', 'unordered(additional_information)', + 'aggregation_key', 'partners', 'skill_names', 'skills',