openedx / openedx/openedx-platform
Use search engine for authoring home search
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Problem:
The search box on the authoring home page (not the one in the navigation bar) uses the following method:
@classmethod
def get_courses_matching_query(cls, query, course_overviews):
"""
Return a queryset of CourseOverview objects filtered by the given query.
Args:
query: A required parameter that allows filtering based on the CourseOverview.
course_overviews: A queryset of CourseOverview objects to filter.
"""
return course_overviews.filter(
Q(display_name__icontains=query) |
Q(org__icontains=query) |
Q(id__icontains=query)
)
Although this search is case-insensitive, it still requires typing the exact term contained in the searchable fields.
This makes the search not very intelligent, especially for course names that include codes or languages with accents.
Since we already have a search engine available, I think we should utilize it to enhance the search experience.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with get_courses_matching_query in openedx/core/djangoapps/content/course_overviews/models.py and trace how the authoring home page calls it. Then inspect the existing search-engine integration and determine how it can replace the current field filtering. Done means the authoring home search uses the search engine and improves matching for course codes and accented names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100