Installing, Configuring, and Running the Open edX Platform
  • 1. For Your Information
    • 1.1. Change Log
    • 1.2. Read Me
    • 1.3. Preface
    • 1.4. edX Browser Support
  • 2. Open edX Birch Release
    • 2.1. What’s Included in Birch
    • 2.2. What is the Birch Git Tag?
    • 2.3. Installing the Birch Release
    • 2.4. Upgrading from Aspen to Birch
  • 3. Open edX Platform Installation Options
    • 3.1. Open edX Developer Stack
    • 3.2. Open edX Fullstack
  • 4. Installing the Open edX Developer Stack
    • 4.1. Overview
    • 4.2. Components
    • 4.3. Knowledge Prerequisites
    • 4.4. Software Prerequisites
    • 4.5. Install DevStack
    • 4.6. Install Devstack using the Torrent file
    • 4.7. Troubleshooting the Devstack Installation
  • 5. Running the Open edX Developer Stack
    • 5.1. Connect to the Devstack Virtual Machine
    • 5.2. Set Up Ability to Preview Units (Mac/Linux Only)
    • 5.3. Customize the Source Code Location
    • 5.4. Run the LMS on Devstack
    • 5.5. Run Studio on Devstack
    • 5.6. Run Discussion Forums on Devstack
    • 5.7. Default Accounts on Devstack
  • 6. Installing Open edX Fullstack
    • 6.1. Overview
    • 6.2. Components
    • 6.3. Knowledge Prerequisites
    • 6.4. Software Prerequisites
    • 6.5. Install Open edX Fullstack
    • 6.6. Browser Login to Open edX Fullstack
  • 7. Configuring the Open edX Platform
    • 7.1. Guidelines for Updating the edX Platform
    • 7.2. Add the Google Drive and Google Calendar XBlock
    • 7.3. Enable Course Prerequisites
    • 7.4. Enable Entrance Exams
    • 7.5. Enabling Course and Video Licensing
    • 7.6. Enable edX Search
    • 7.7. Enabling Certificates
    • 7.8. Enabling Badging
    • 7.9. Enabling Custom Courses
  • 8. Installing edX Insights
    • 8.1. Overview
    • 8.2. What You Should Know Before You Start
    • 8.3. Planning Your Deployment
    • 8.4. Example Deployments
  • 9. Setting up the edX Mobile Applications
    • 9.1. Accessing the Source Code
    • 9.2. Configuring Mobile Application Features
    • 9.3. Configuring Video Modules for Mobile
    • 9.4. Enabling Push Notifications
  • 10. Glossary
    • 10.1. A
    • 10.2. C
    • 10.3. D
    • 10.4. E
    • 10.5. F
    • 10.6. G
    • 10.7. H
    • 10.8. I
    • 10.9. K
    • 10.10. L
    • 10.11. M
    • 10.12. N
    • 10.13. O
    • 10.14. P
    • 10.15. Q
    • 10.16. R
    • 10.17. S
    • 10.18. T
    • 10.19. U
    • 10.20. V
    • 10.21. W
    • 10.22. XYZ
 
Installing, Configuring, and Running the Open edX Platform
  • Table of Contents »
  • 7.6. Enable edX Search
  • Edit on GitHub

7.6. Enable edX Search¶

Chapter Contents:

  • Enable edX Search
    • Overview
    • Search Engines and edX Search
      • MockSearchEngine
      • ElasticSearchEngine
    • EdX Search Requirements
    • Install edX Search
      • Option 1 – Add Requirement
      • Option 2 – Install Locally
      • Option 3 – Install from Github
    • Enable Indexing
      • Which Data Gets Indexed
    • Supported Flags
      • CMS
      • LMS

7.6.1. Overview¶

EdX Search is a Django application that provides access to search services from within edX Platform applications. Searching is accomplished by creating an index of documents, and then searching within that index for matching information.

7.6.2. Search Engines and edX Search¶

By default, edX Search uses MockSearchEngine for testing and ElasticSearch Engine for production. You can configure edX Search to use a different search engine.

7.6.2.1. MockSearchEngine¶

MockSearchEngine is a simple implementation using a JSON file for index storage. It has no specific requirements, but it does not scale well and should only be used for testing.

7.6.2.2. ElasticSearchEngine¶

ElasticSearchEngine is a ElasticSearch back-end implementation. It uses same ElasticSearch version that is already part of edX Platform. The current version is v0.90.13, and Django Elasticsearch is 0.4.5.

7.6.3. EdX Search Requirements¶

EdX Search requires the following applications.

  • Django (edX Platform version)
  • pyMongo (edX Platform version)
  • pytz
  • Django elasticsearch (0.4.5)

7.6.4. Install edX Search¶

EdX Search is included in edX Platform Github requirements and is installed automatically when you install edX Platform.

For existing installations, you must install edX Search manually.

To install edX Search, make sure you are logged to your server as the edxapp user and are located in edx-platform directory.

If you are not, run the following before continuing:

sudo su edxapp -s /bin/bash cd ~source edxapp_env

Then install edX Search using one of the three following options.

7.6.4.1. Option 1 – Add Requirement¶

Add the Github link to edx-search to the requirements/edx/github.txt file.

-e git+https://github.com/edx/edx-search.git@ae459ead41962c656ce794619f58cdae46eb7896#egg=edx-search

Then reinstall Github requirements.

pip install -r requirements/edx/github.txt

7.6.4.2. Option 2 – Install Locally¶

Checkout the edx-search Github repository.

Then in the edx-search directory, run the following command.

pip install -e ./

7.6.4.3. Option 3 – Install from Github¶

Run pip with a Github link.

pip install -e git+https://github.com/edx/edx-search.
  git@ae459ead41962c656ce794619f58cdae46eb7896

7.6.5. Enable Indexing¶

You enable course indexing by setting the ENABLE_COURSEWARE_INDEX flag.

You enable library indexing by setting the ENABLE_LIBRARY_INDEX flag.

Indexing is done from Studio as a Celery task. Every publish event triggers the reindex procedure.

You can also reindex the course manually through the Reindex button in the Course Overview page.

7.6.5.1. Which Data Gets Indexed¶

Which data gets indexed is determined by the module index_dictionary() function implementation. Modules supporting this method are Sequence, Vertical, Video and HTML Block. You can add support to any module type.

Course metadata, including the name, description, and start and end dates are also indexed.

7.6.6. Supported Flags¶

The following flags are supported in the CMS and LMS applications.

7.6.6.1. CMS¶

  • ENABLE_COURSEWARE_INDEX: Enables/disables courseware content and course info indexing.

  • ENABLE_LIBRARY_INDEX: Enables/disables library content indexing.

  • SEARCH_ENGINE: Sets used search engine. There are 2 predefined values, but more can be added:

    • "search.elastic.ElasticSearchEngine"
    • "search.tests.mock_search_engine.MockSearchEngine"
  • ELASTIC_FIELD_MAPPINGS: Sets any additional field mappings that elastic search should be aware of. For example, the following code includes the course start date:

    ELASTIC_FIELD_MAPPINGS = {
      "start_date": {
        "type": "date"
      }
    }
    

7.6.6.2. LMS¶

  • ENABLE_COURSEWARE_SEARCH: Enables/disables Courseware Search feature (in course searching)
  • ENABLE_DASHBOARD_SEARCH: Enables/disables Dashboard Search feature (in enrolled courses searching)
  • ENABLE_COURSE_DISCOVERY: Enables/disables Course Discovery feature (over courses searching and facet filtering)
  • SEARCH_ENGINE: Sets used search engine. There are 2 predefined values, but more can be added:
    • "search.elastic.ElasticSearchEngine"
    • "search.tests.mock_search_engine.MockSearchEngine"
  • SEARCH_INITIALIZER: Used to set custom SearchInitializer.SearchInitializer provides an extension to achieve masquerade and other presearch environmental settings.
    • default: SearchInitializer
    • LMS implementation: lms.lib.courseware_search.lms_search_initializer.LmsSearchInitializer
  • SEARCH_RESULT_PROCESSOR: Used to set custom SearchResultProcessor. SearchResultProcessor does post processing and data manipulation on a result set returned by SearchEngine.
    • default: SearchResultProcessor
    • LMS implementation: lms.lib.courseware_search.lms_result_processor.LmsSearchResultProcessor
  • SEARCH_FILTER_GENERATOR: Used to set custom SearchFilterGenerator. SearchFilterGenerator sets filters defined by current active user. Basic implementation sets only course start date filter.
    • default: SearchFilterGenerator
    • LMS implementation: "lms.lib.courseware_search.lms_filter_generator.LmsSearchFilterGenerator"
Next Previous

© Copyright 2015, edX.