December 13, 2022

Enable Search Feature on Open edX

Activities, Android Developer, Ansible, Apache2, Atlassian, Ayo Belajar Linux, Bestpath Network, BLC Telkom Klaten, BSD, Caddy Server, Case Study, Cisco, Cisco Indonesia, Cloud Computing, Cockpit, Custom Weapons, Docker, E-Learning, Engenius, Error, FreeBSD, FreeBSD Indonesia, Komunitas Pengguna Linux Indonesia, KPLI Bulukumba, KPLI Klaten, Lets Encrypt, Linux, MacOS, Microsoft Azure, Microsoft SQL Server, MikroTik, MikroTik Indonesia, MySQL, Nginx, Open edX, OpenSID, Others, PHP, phpMyAdmin, PostgreSQL, Proxmox, Python, Redash, Sendy, SSH, Stories, Subnetting, TP-Link, Ubiquiti, Unix, Virtualization, Windows, X-Mosque, Faizar Septiawan, Icar, siBunglonGanteng, Orang Ganteng, siBunglonLabs, Programmer, SysAdmin, Site Reliability Engineer, Developer, Palugada, Makassar, Ganteng, Gila, Cyclist, Panglima, Setan, Panglima Setan, sibunglon, Ganteng

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:

  1. Go to Open edX server console.

  2. 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 to True (default, False).

         # Enable the courseware search functionality
         'ENABLE_COURSEWARE_INDEX': True,
    

    Find the SEARCH_ENGINE configuration, and set it to search.elastic.ElasticSearchEngine (default, None).

    # Default to no Search Engine
    SEARCH_ENGINE: "search.elastic.ElasticSearchEngine",
    
  3. 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 to True (default, False).

         # Courseware search feature
         'ENABLE_COURSEWARE_SEARCH': True,
    

    Find the ENABLE_COURSE_DISCOVERY configuration, and set it to True (default, False).

         # Course discovery feature
         'ENABLE_COURSE_DISCOVERY': True,
    

    Find the SEARCH_ENGINE configuration, and set it to search.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 to True (default, False).

    # Override to skip enrollment start date filtering in course search
    SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
    
  4. Restart LMS and CMS services.

  5. 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