Fix: respect course_org_filter when expanding organization facets using meilisearch - #277
Conversation
|
Thanks for the pull request, @DeimerM! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
Hi @Serj-N and @bradenmacdonald, could you please take a look at this PR? It is related to the changes in #213. Thanks! |
There was a problem hiding this comment.
Makes sense. Thanks for the detailed report and fix.
I tested this and it's working well. Could you please fix the quality issue and add a test?
Please also increase the version in this file if you want us to publish a new release that you can use right away.
Thanks a lot for your comments, @bradenmacdonald. I have fixed the quality tests and added the new test. I also updated the plugin version. Please let me know if you have any additional feedback! |
Description
During testing with the catalog MFE, I discovered that the organizations filter does not respect the course_org_filter configuration. Currently, all organizations are being returned and populated in the organization filter.
This issue occurs during the facet expansion logic, which removes filters for the target facet to retrieve its full distribution. However, the organization facet's distribution should not be fully expanded, as it must be constrained by the course_org_filter configuration. This ensures the catalog only displays the specific organizations configured for the site. This filtering logic is natively implemented in the default Search Filter Generator: lms_filter_generator.py.
To resolve this, I implemented a mechanism to propagate the course_org_filter initially returned by the Search Filter Generator (if it exists in the field_dictionary). Now, when the logic expands the full distribution for organizations, it correctly filters them based on the valid organizations allowed for the site.
Current and Expected Behavior
How to Test