From 610aaf349f17ea6146968353ee0093fc8f3c1c4c Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Thu, 19 Sep 2024 19:46:41 +0530 Subject: [PATCH] feat: add block_id field to filterable attributes of meilisearch --- openedx/core/djangoapps/content/search/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openedx/core/djangoapps/content/search/api.py b/openedx/core/djangoapps/content/search/api.py index 71d09590d003..7fe964128e5a 100644 --- a/openedx/core/djangoapps/content/search/api.py +++ b/openedx/core/djangoapps/content/search/api.py @@ -315,6 +315,8 @@ def rebuild_index(status_cb: Callable[[str], None] | None = None) -> None: client.index(temp_index_name).update_distinct_attribute(Fields.usage_key) # Mark which attributes can be used for filtering/faceted search: client.index(temp_index_name).update_filterable_attributes([ + # Get specific block/collection using combination of block_id and context_key + Fields.block_id, Fields.block_type, Fields.context_key, Fields.org,