Skip to content

Conversation

@abeglova
Copy link
Contributor

@abeglova abeglova commented Oct 10, 2024

What are the relevant tickets?

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

Description (What does it do?)

#1590 was supposed to make the search setting settable from the environment. This worked for the backend but not the frontend. This creates a small api page that shares the defaults with the frontend

How can this be tested?

Go to http://open.odl.local:8062/search/ . Everything should work as expected as both an admin user and non-logged in user.

Log in as an admin. You should be able to manipulate the admin search settings.

Set some of the setting from your .env variable. For example
DEFAULT_SEARCH_SLOP=2
DEFAULT_SEARCH_MODE=best_fields

Restart docker. The defaults in the admin facet should be set to the settings from your .env file

@abeglova abeglova force-pushed the ab/search-defaults-fix branch from 370bfb5 to 1ae0593 Compare October 11, 2024 15:17
@abeglova abeglova marked this pull request as ready for review October 11, 2024 15:23
@shanbady shanbady self-assigned this Oct 15, 2024
@shanbady shanbady self-requested a review October 15, 2024 13:36
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.

Looks good. works as intended

@abeglova abeglova force-pushed the ab/search-defaults-fix branch from 1ae0593 to eca0dcb Compare October 15, 2024 14:18
@abeglova abeglova merged commit 24c9309 into main Oct 15, 2024
11 checks passed
@odlbot odlbot mentioned this pull request Oct 15, 2024
4 tasks
@rhysyngsun rhysyngsun deleted the ab/search-defaults-fix branch February 7, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants