Skip to content

Commit 15652f0

Browse files
authored
add is_incomplete_or_stale to default sort (#1641)
1 parent 6d9cccc commit 15652f0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

learning_resources_search/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@
4040

4141
LEARN_SUGGEST_FIELDS = ["title.trigram", "description.trigram"]
4242
COURSENUM_SORT_FIELD = "course.course_numbers.sort_coursenum"
43-
DEFAULT_SORT = ["featured_rank", "is_learning_material", "-created_on"]
43+
DEFAULT_SORT = [
44+
"featured_rank",
45+
"is_learning_material",
46+
"is_incomplete_or_stale",
47+
"-created_on",
48+
]
4449

4550

4651
def gen_content_file_id(content_file_id):

learning_resources_search/api_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,7 @@ def test_document_percolation(opensearch, mocker):
27002700
[
27012701
"featured_rank",
27022702
"is_learning_material",
2703+
"is_incomplete_or_stale",
27032704
{"created_on": {"order": "desc"}},
27042705
],
27052706
),

0 commit comments

Comments
 (0)