Repository navigation
[FC-0144] Python search API with text, paging and exact filters - #34
Conversation
|
Thanks for the pull request, @navinkarkera! 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. |
a3f5153 to
f545a55
Compare
There was a problem hiding this comment.
LGTM 👍
Thank you for your work, @navinkarkera!
- I tested this using the instructions from the PR
- I read through the code
- I checked for accessibility issues
- Includes documentation
Left a NIT and a comment.
Note: I think it would be better to base it on #32 instead of #33, so we can merge it earlier.
I will probably have #33 after all the base functions (which may also include #40)
cf4d5c9 to
a944a4b
Compare
a944a4b to
706080d
Compare
|
I've rebased onto #32 as you suggested, so this PR now has just the library-side search API - One heads-up: the Meilisearch code had to move out. The adapter doesn't exist on #32, so So this PR is fake-tested only; the live Meilisearch testing I did applies to that branch. Feel free to fold those commits into #33 when it lands, or I can open a PR from it - whatever works best for you. |
|
Thanks @navinkarkera! Edit: Can you also add "[FC-0144]" to the title, and "Closes #9" so it links to the issue? |
|
@rpenido Thanks! update the pr description as well as title. I think all review comments are addressed now. |
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.
7b83eaf to
54fe7ca
Compare
| for ``api.search()``, in addition to the ``settings.get`` the adapter already | ||
| needs to reconcile settings and to check the page limit. ``search_api_key`` | ||
| stays optional and unrelated to these calls: it is the parent key for scoped | ||
| tenant credentials. |
There was a problem hiding this comment.
Could be useful to mention
Typesense requires it: the parent of a scoped key must
allow onlydocuments:search, so the write key (api_key) cannot mint one.
here too. Just because it's not clear and the reader may have missed it in the ADR 002.
| (``id IN [x, y, z]``). Whether ``total`` is exact is an engine property, | ||
| reported in ``SearchResult.total_is_exact``. It is never assumed from a | ||
| successful request. |
There was a problem hiding this comment.
Nit: this data structure is for the request, not the response, so why is the docstring describing the total field in the response?
|
I'm going to close and re-open to see if that triggers the CLA check to work. |
Pull request was closed
Adds a Python search API for maintenance tasks: a
SearchQuerywith text, exact-match filters and paging, exposed throughapi.search, with filter fields validated against the schema. No frontend changes.Diff: open-craft/openedx-search@rpenido/FAL-4404/upsert-delete-api...feat/python-filter-query
Based on #32 (per review) so it can merge once the base functions land. The Meilisearch adapter lives in #33, so the Meilisearch
search()implementation and its tests are NOT in this PR - they're on thefeat/python-filter-query-meilisearchbranch, stacked on #33, where the feature was tested live on dev Tutor with Meilisearch. This PR is tested via the fake adapter.Closes #9