Course discovery not working

337 views
Skip to first unread message

mor...@appsembler.com

unread,
Nov 19, 2015, 4:31:22 PM11/19/15
to Open edX operations
We're having issues getting the search to work on the /courses page. I've tried setting the following options in both lms.env.json and lms/envs/common.py:

ENABLE_COURSEWARE_INDEX: True
ENABLE_LIBRARY_INDEX: True
ENABLE_COURSEWARE_SEARCH: True
ENABLE_DASHBOARD_SEARCH: True
ENABLE_COURSE_DISCOVERY: True

When I search on the /courses page, lms-stderr.log shows the following, so I know the the LMS can talk to elasticsearch:

2015-11-19 16:13:35,993 INFO 3172 [urllib3.connectionpool] connectionpool.py:207 - Starting new HTTP connection (1): elasticsearch
2015-11-19 16:13:35,997 INFO 3172 [elasticsearch] base.py:49 - HEAD http://elasticsearch:9200/courseware_index [status:200 request:0.005s]
2015-11-19 16:13:36,005 INFO 3172 [elasticsearch] base.py:49 - GET http://elasticsearch:9200/courseware_index/course_info/_search?from=0&size=20 [status:200 request:0.008s]

I've tried reindexing courses in the CMS and making sure that the courses are open for enrollment. Also, search on the /dashboard page does work, so I know that elasticsearch is working.

Other people seem to have had similar issues:

Is there anything we need to do besides setting these flags and reindexing the courses?

Thanks,
Morgan
search1.png

Dino Cikatic

unread,
Nov 20, 2015, 6:45:48 AM11/20/15
to Open edX operations
Hi Morgan,

I'm not exactly sure what is causing your problem, because it seems like ES and edx-search app are running properly for you. What might help is giving me an exact version of the platform you are running and example of a POST request that works and fails.

Although, only way I could replicate issue similar to yours is if my courses had invalid (passed) enrollment dates.
You can set course discovery to ignore these by setting:
SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True

Please see if that helps.

Thanks,
Dino

LIubov Fomicheva

unread,
Nov 23, 2015, 5:55:54 AM11/23/15
to Open edX operations
Great catch, Dino!

  I was wondering why some courses are now showed when course discovery is on, but had not time to investigate. This behaviour seems a bit confusing because all courses are shown for staff members when course discovery is off, but some of them disappear when this feature is on.

Thanks for your explanation,
  Liubov
Reply all
Reply to author
Forward
0 new messages