Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add is_incomplete_or_stale to default sort #1641

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

abeglova
Copy link
Contributor

@abeglova abeglova commented Oct 2, 2024

What are the relevant tickets?

closes https://github.com/mitodl/hq/issues/5658

Description (What does it do?)

#1627 added the is_incomplete_or_stale field to the search index
this pr updates the defualt search to use it

How can this be tested?

run ./manage.py recreate_index --all (if you have not since #1627 was merged)

comment out line 420 from learning_resource_search/constants.py to remove is_incomplete_or_stale from SOURCE_EXCLUDED_FIELDS

Go to http://api.open.odl.local:8063/api/v1/learning_resources_search/?topic=Biology

The first page should be all courses/programs with is_incomplete_or_stale=false. After a few pages you should see all courses/programs with is_incomplete_or_stale=true. For me that was the fourth page. The last few pages should be all learning materials (podcasts and videos)

If you manually created/updated a featured list associated with a channel and added a stale or incomplete learning resource to it you will still see an incomplete/stale resource at the start of the results since featured resources are shown first regardless of is_incomplete_or_stale state

@abeglova abeglova marked this pull request as ready for review October 2, 2024 19:30
@abeglova abeglova added the Needs Review An open Pull Request that is ready for review label Oct 3, 2024
@shanbady shanbady self-requested a review October 3, 2024 19:02
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@abeglova abeglova merged commit 15652f0 into main Oct 3, 2024
11 checks passed
@odlbot odlbot mentioned this pull request Oct 4, 2024
5 tasks
shanbady added a commit that referenced this pull request Oct 8, 2024
* set default minimum score cutoff (#1642)

* add is_incomplete_or_stale to default sort (#1641)

* Release 0.20.4

* Use a partial match mode as the search mode for instructor fields(#1652)

* Release date for 0.20.4

* update og:image to use new logo (#1658)

* Release 0.21.0

* Ignore NotFoundErrors in switch_indices function (#1654)

* Release date for 0.21.0

* Shanbady/randomize featured resources (#1653)

* removing backend randomization

* removing results randomization

* moiving shuffle to frontend

* fixing tests

* test fix

* refactoring to old randomization method on frontend

* updating spec

* fixing typechecks

* updating spec and adding position field to api

* adding position to factory

* fixing test

* adding new og-image

---------

Co-authored-by: Anastasia Beglova <[email protected]>
Co-authored-by: Doof <[email protected]>
Co-authored-by: Chris Chudzicki <[email protected]>
Co-authored-by: Matt Bertrand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review An open Pull Request that is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants