Skip to content

Commit

Permalink
add is_incomplete_or_stale to default sort (#1641)
Browse files Browse the repository at this point in the history
  • Loading branch information
abeglova authored and mbertrand committed Oct 4, 2024
1 parent 90edebd commit db2980b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion learning_resources_search/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@

LEARN_SUGGEST_FIELDS = ["title.trigram", "description.trigram"]
COURSENUM_SORT_FIELD = "course.course_numbers.sort_coursenum"
DEFAULT_SORT = ["featured_rank", "is_learning_material", "-created_on"]
DEFAULT_SORT = [
"featured_rank",
"is_learning_material",
"is_incomplete_or_stale",
"-created_on",
]


def gen_content_file_id(content_file_id):
Expand Down
1 change: 1 addition & 0 deletions learning_resources_search/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2700,6 +2700,7 @@ def test_document_percolation(opensearch, mocker):
[
"featured_rank",
"is_learning_material",
"is_incomplete_or_stale",
{"created_on": {"order": "desc"}},
],
),
Expand Down

0 comments on commit db2980b

Please sign in to comment.