Skip to content

feat: [FC-86] add sorting feature for engines + enable_course_sorting_by_star…#205

Merged
ormsbee merged 4 commits intoopenedx:masterfrom
raccoongang:rg/axm-course-catalog-add-sorting-feature
Sep 3, 2025
Merged

feat: [FC-86] add sorting feature for engines + enable_course_sorting_by_star…#205
ormsbee merged 4 commits intoopenedx:masterfrom
raccoongang:rg/axm-course-catalog-add-sorting-feature

Conversation

@andrii-hantkovskyi
Copy link
Contributor

@andrii-hantkovskyi andrii-hantkovskyi commented Jun 3, 2025

Add Sorting Feature for Engines + enable_course_sorting_by_start_date Parameter

This PR introduces a sorting feature for search engines and adds a new parameter, enable_course_sorting_by_start_date, to the course discovery search.

Key changes:

  • Adds enable_course_sorting_by_start_date to the course discovery search API, allowing results to be sorted by course start date when enabled.
  • Implements a generic SortField dataclass and FieldTypes enum to support flexible sorting across different search engines.
  • Updates ElasticSearch, Meilisearch, and mock search engine backends to support sorting via the sort_by parameter.
  • Ensures Meilisearch index is configured with start as a sortable field.
  • Updates the course discovery view to accept and forward the new sorting parameter.
  • Adds comprehensive tests verifying sorting behavior by course start date.

These changes allow consumers to opt into sorting course results by start date, enabling richer search and browsing experiences across all supported backends.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 3, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 3, 2025

Thanks for the pull request, @andrii-hantkovskyi!

This repository is currently maintained by @Ali-Salman29.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Jun 3, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Jun 3, 2025
@andrii-hantkovskyi andrii-hantkovskyi force-pushed the rg/axm-course-catalog-add-sorting-feature branch from d91e7b7 to 4902ca5 Compare June 11, 2025 17:22
@andrii-hantkovskyi andrii-hantkovskyi force-pushed the rg/axm-course-catalog-add-sorting-feature branch from 4902ca5 to 91315d2 Compare June 11, 2025 17:27
@andrii-hantkovskyi andrii-hantkovskyi marked this pull request as ready for review June 11, 2025 17:31
@andrii-hantkovskyi
Copy link
Contributor Author

andrii-hantkovskyi commented Jun 11, 2025

Hi @diana-villalvazo-wgu would you have a chance to review this PR when you have a moment?

@andrii-hantkovskyi andrii-hantkovskyi requested review from diana-villalvazo-wgu and removed request for kdmccormick June 11, 2025 17:38
@ormsbee ormsbee self-requested a review June 17, 2025 17:36
Copy link

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few high-level questions to start with.

@andrii-hantkovskyi andrii-hantkovskyi changed the title feat: add sorting feature for engines + enable_course_sorting_by_star… feat: [FC-86] add sorting feature for engines + enable_course_sorting_by_star… Jun 18, 2025
@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Jun 20, 2025
@mphilbrick211 mphilbrick211 moved this from Waiting on Author to In Eng Review in Contributions Jun 20, 2025
Copy link

@diana-villalvazo-wgu diana-villalvazo-wgu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Abdul-Muqadim-Arbisoft
Copy link

@andrii-hantkovskyi Since this PR is approved, can we go ahead and merge it? Looking forward to it.

@Serj-N
Copy link
Contributor

Serj-N commented Aug 15, 2025

@andrii-hantkovskyi Since this PR is approved, can we go ahead and merge it? Looking forward to it.

@Abdul-Muqadim-Arbisoft Hi! I'm stepping in for @andrii-hantkovskyi. We will have one final look at this and move forward with a merge.

@sarina
Copy link
Contributor

sarina commented Aug 26, 2025

Hi all, what's the status on this PR? It has an approval from July 21st. It's blocking work on the Catalog MFE. Can we get it merged?

@Serj-N
Copy link
Contributor

Serj-N commented Aug 27, 2025

Hi all, what's the status on this PR? It has an approval from July 21st. It's blocking work on the Catalog MFE. Can we get it merged?

@sarina Hi! We see no problems with this PR, so you can safely merge it.

@sarina
Copy link
Contributor

sarina commented Aug 27, 2025

I'm not a CC on this repo. @ormsbee was there a reason you didn't merge this after your approval?

@sarina sarina moved this from In Eng Review to Ready to Merge in Contributions Aug 27, 2025
@feanil feanil requested a review from Ali-Salman29 September 3, 2025 15:19
@feanil
Copy link
Contributor

feanil commented Sep 3, 2025

@Ali-Salman29 can you merge and release this change?

@ormsbee
Copy link

ormsbee commented Sep 3, 2025

@sarina: I didn't merge at the time because I thought the team would want to control the merge timing/rollout, and I had assumed someone on the team had access to do so. I'll just merge it now.

@ormsbee ormsbee merged commit 990160d into openedx:master Sep 3, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in Contributions Sep 3, 2025
feanil added a commit that referenced this pull request Sep 3, 2025
We didn't bump the version when #205 landed.

This change bumps the version so we can release the new version of the library.
@feanil
Copy link
Contributor

feanil commented Sep 3, 2025

FYI, it looks like we didn't bump the verison or publish the repo so I'll do that now. #224 bumps the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants