set default minimum score cutoff #1642
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
closes https://github.com/mitodl/hq/issues/5659
Description (What does it do?)
Adds a default minimum score cutoff to searches with a search term so we show fewer weakly relevant results
How can this be tested?
Login as an admin and go to
http://open.odl.local:8062/search
Verify that the minimum score cutoff slider in the Admin options facet of the search is set to 5
Make a search with a search term. Verify that the number of results increases as you set the minimum score to a lower value and decreases when you set it to a higher value
Additional Context
I decided on 5 after playing with the setting on prod for a bit - we may adjust it higher or lower.
#1590 was supposed to make the search setting settable from the environment. This worked for the backend but not the front end, so I need a commit to update these values for now. It probably makes sense to add a small api endpoint to communicate the values from the backend to the front end so we can set them from heroku but maybe that's not very high priority