-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: meilisearch backend #35026
feat: meilisearch backend #35026
Conversation
Thanks for the pull request, @qasimgulzar! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Hi @qasimgulzar! Just flagging that there's a failing check here. Would you mind taking a look? Thanks! |
97702c5
to
aefe51c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please provide instructions for testing this PR?
I believe it depends on openedx/edx-search#150 for example, but this PR doesn't link to that one nor vice versa.
if hasattr(searcher, "backend_name") and searcher.backend_name == 'meilisearch': | ||
result_ids = [result["id"] for result in response["results"]] | ||
else: | ||
result_ids = [result["data"]["id"] for result in response["results"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the SearchEngine
subclass in edx-search
be transforming these results so that they're the same? I'd like to find a way to get rid of this if
condition.
@@ -138,6 +141,9 @@ def index(cls, modulestore, structure_key, triggered_at=None, reindex_age=REINDE | |||
if not searcher: | |||
return | |||
|
|||
if hasattr(searcher, "update_settings"): | |||
searcher.update_settings() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update_settings
is not a clear name. I would prefer something likeensure_index_exists()
orprepare_index()
- You should define and document this on the base class, so we can call it unconditionally here. Then it's part of the abstract API; but here it's just Meilisearch-specific code.
if hasattr(searcher, "backend_name") and searcher.backend_name == 'meilisearch': | ||
result_ids = [result["id"] for result in response["results"]] | ||
else: | ||
result_ids = [result["data"]["id"] for result in response["results"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here - we should get rid of the if
d8527b5
to
01a8b44
Compare
Hi @qasimgulzar! Just checking in to see if you are still planning to pursue this pull reqeust? |
No more required this PR, implementation os moved to openedx api |
Added meilisearch searcher backend class in edx-platform to support meilisearch integration.
Reason why I implemented inside edx-platform.
By using new meilisearch backend I have successfully managed to index exisitng elasticsearch compatibale indexes to meilisearch.