From b0e7198731d35e98f3019909470dfcb8e1d1fa28 Mon Sep 17 00:00:00 2001 From: Anastasia Beglova Date: Mon, 8 Jul 2024 15:41:20 -0400 Subject: [PATCH] extra weight for instructors --- learning_resources_search/api_test.py | 24 ++++++++++++------------ learning_resources_search/constants.py | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/learning_resources_search/api_test.py b/learning_resources_search/api_test.py index ecc3bf6051..a9134262dd 100644 --- a/learning_resources_search/api_test.py +++ b/learning_resources_search/api_test.py @@ -229,8 +229,8 @@ def test_generate_learning_resources_text_clause(): "query": "math", "fields": [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ], } }, @@ -338,8 +338,8 @@ def test_generate_learning_resources_text_clause(): "query": "math", "fields": [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ], } }, @@ -463,8 +463,8 @@ def test_generate_learning_resources_text_clause(): "query": '"math"', "fields": [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ], } }, @@ -575,8 +575,8 @@ def test_generate_learning_resources_text_clause(): "query": '"math"', "fields": [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ], } }, @@ -1144,8 +1144,8 @@ def test_execute_learn_search_for_learning_resource_query(opensearch): "query": "math", "fields": [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ], } }, @@ -1264,8 +1264,8 @@ def test_execute_learn_search_for_learning_resource_query(opensearch): "query": "math", "fields": [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ], } }, diff --git a/learning_resources_search/constants.py b/learning_resources_search/constants.py index 0eb0986120..a41454b197 100644 --- a/learning_resources_search/constants.py +++ b/learning_resources_search/constants.py @@ -338,8 +338,8 @@ class FilterConfig: RUN_INSTRUCTORS_QUERY_FIELDS = [ "runs.instructors.first_name", - "runs.instructors.last_name", - "runs.instructors.full_name", + "runs.instructors.last_name^5", + "runs.instructors.full_name^5", ] RESOURCEFILE_QUERY_FIELDS = [