Repository navigation
Conversation
|
Thanks for the pull request, @rpenido! 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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. 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. |
6f26b57 to
3e1ecdd
Compare
3e1ecdd to
c05457a
Compare
c05457a to
aa7cf78
Compare
aa7cf78 to
d891875
Compare
d891875 to
679b2c0
Compare
c2a4449 to
8b35b03
Compare
SearchQuery carries the text, one bounded page and the same exact filter expression delete() accepts, including id equality and IN lists. api.search() resolves the registration and delegates to Adapter.search(), which the Meilisearch adapter implements against the live index with q, offset, limit and the rendered filter. count_only sends limit 0 so the migrator can count without transferring a page; the estimated total is never reported as exact.
The shared hit count validation it also carried belongs to the Meilisearch adapter branch.
bea9d6c to
9e66735
Compare
Render the query text, one page and the filters for the live index, and reject a page window beyond pagination.maxTotalHits instead of returning a short page. Co-authored-by: Navin Karkera <navin@opencraft.com>
Preserve the receipt's unit through the task checks and include it in WriteFailed, so a rebuild failure names the consumer batch.
9e66735 to
5e0397b
Compare
Description
Implements the Meilisearch adapter on top of the rebuild contract in #40, the search API in #34, the write API in #32 and the credential API in #35, as part of #14. The branch is stacked on
rpenido/FAL-4413/rebuild-lifecycle; until #32, #34, #35 and #40 merge, the compare view also lists their commits, and only 03ccd21, 982c196, df599a5, 5a4b037, 1108dd3, ea46a4f and 5e0397b belong to this PR.The adapter is registered from
AppConfig.ready()and implementssearchagainst the live index, including the page check againstpagination.maxTotalHits. Its task checks preserve the receipt'sunitand include it inWriteFailed, so a rebuild failure names the Meilisearch batch. It renders the index settings from the declared schema:searchableAttributesfollowsSearchable.order(unordered fields last, in declaration order),filterableAttributesalways includesidso id filters behave as they do on Typesense, andrankingRulesputssortfirst so an explicit sort outranks relevance.reconcilecreates the index, rejects an existing index whose primary key is notid, and patches only the settings that drifted.The rebuild primitives remove targets with the same index and version prefix, swap the target into the live logical name, and discard the target on abort. The live index keeps the logical name, so the swap never needs a rename.
check_writeschecks the pending tasks in one request withGET /tasks?uids=, preserving order, andcommit_rebuildwaits for the target's enqueued and processing tasks before the swap.upsertanddeletesubmit one bounded batch to the live index or to a rebuild target and return the Meilisearch task id;check_writeperforms one poll and raisesWriteFailedwhen the task failed or was canceled, and a failed or unknown task in a batch does the same. Datetimes are written as POSIX seconds, and the abstract filter expression renders as ANDed groups of ORed terms.The transport is a small
urllibclient instead of a new dependency, because the Open edX platform pins its own requirements. It follows no redirects, bounds the response size, and never puts a credential or a response body into an exception.mint_credentialsigns a tenant token for the live index with HMAC-SHA256: it reads the parent key's UID from/keys, embeds the scope's filters assearchRules, and expires after the requested lifetime. Following ADR 0002, the parent issearch_api_keywhen set, otherwiseapi_key; the master key is not listed and cannot sign. A known-answer test pins the token to the official client's output.Testing instructions
uv run --group test pytest -qfor the suite, anduv run tox -e qualityfor the linters.MeilisearchAdapter(registration, backend).settings().Additional Information
Related to:
Depends on:
Used by:
Private ref: FAL-4411