Enable Search Feature on Open edX
Within Open edX, prospective learners can find courses more easily. When a learner searches for a key word or words, the search feature returns a list of the courses that are currently open for enrollment and that match the entered key words.
By default, Open edX search uses ElasticSearch Engine for production. To enable Open edX Search, follow the steps below:
-
Go to Open edX server console.
-
Open and edit CMS default configuration (
/edx/app/edxapp/edx-platform/cms/envs/common.py
)Then find the
ENABLE_COURSEWARE_INDEX
configuration, and set it toTrue
(default, False).# Enable the courseware search functionality 'ENABLE_COURSEWARE_INDEX': True,
Find the
SEARCH_ENGINE
configuration, and set it tosearch.elastic.ElasticSearchEngine
(default, None).# Default to no Search Engine SEARCH_ENGINE: "search.elastic.ElasticSearchEngine",
-
Open and edit LMS default configuration (
/edx/app/edxapp/edx-platform/lms/envs/common.py
)Then find the
ENABLE_COURSEWARE_SEARCH
configuration, and set it toTrue
(default, False).# Courseware search feature 'ENABLE_COURSEWARE_SEARCH': True,
Find the
ENABLE_COURSE_DISCOVERY
configuration, and set it toTrue
(default, False).# Course discovery feature 'ENABLE_COURSE_DISCOVERY': True,
Find the
SEARCH_ENGINE
configuration, and set it tosearch.elastic.ElasticSearchEngine
(default, None).# Use None for the default search engine SEARCH_ENGINE: "search.elastic.ElasticSearchEngine",
Find the
SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING
configuration, and set it toTrue
(default, False).# Override to skip enrollment start date filtering in course search SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
-
Restart LMS and CMS services.
-
Reindex all course.
sudo -H -u edxapp bash << EOF echo -n "Now as: " && whoami source /edx/app/edxapp/edxapp_env python ~/edx-platform/manage.py cms reindex_course --all EOF