-
Notifications
You must be signed in to change notification settings - Fork 103
Api for metadata #1199
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
base: main
Are you sure you want to change the base?
Api for metadata #1199
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new API path token Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test/Client
participant Index as Index.get_fields()
participant HTTP as HTTP Client
participant Server as Meilisearch Server
Test->>Index: call get_fields(offset?, limit?, filter?)
Index->>HTTP: POST /indexes/{uid}/fields with body {offset, limit, filter}
HTTP->>Server: send request
Server-->>HTTP: 200 OK + JSON list of field metadata
HTTP-->>Index: response payload
Index-->>Test: return List[Dict[str, Any]]
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@meilisearch/index.py`:
- Around line 2608-2610: Remove the trailing whitespace after the statement that
initializes the request body (the line "body: Dict[str, Any] = {}") so the file
no longer contains an extra space at end-of-line; update the block around the
body/offset handling (the code referencing the variable body and the subsequent
if offset is not None) to ensure there are no trailing spaces on any lines.
- Around line 2553-2558: The parameter name 'filter' in get_fields is shadowing
the built-in and triggers pylint W0622; rename the parameter (e.g., to filter_
or filters) and update all internal references within the get_fields function
signature and body to the new name (preserving type Optional[MutableMapping[str,
Any]] and behavior), or if you prefer consistency with nearby methods add the
same local pylint disable used elsewhere instead of renaming; ensure only
get_fields and its internals are changed so the API remains non-breaking.
In `@tests/index/test_index.py`:
- Around line 350-371: The failing linter is due to trailing whitespace in the
new test block that exercises index.get_fields (variables: page1, page2,
limited); open the test_index.py test that contains the pagination assertions
for index.get_fields and remove any trailing spaces at the ends of the affected
lines (the lines with the page1/page2/limited assertions and surrounding
comments) so there are no trailing whitespace characters left, then save and
re-run linting.
#1198
Implements support for the new
POST /indexes/{indexUid}/fieldsendpoint introduced in Meilisearch v1.33.0.Description
This PR adds the
get_fields()method to theIndexclass, which returns detailed metadata about all fields in an index. The endpoint provides comprehensive information about each field's configuration, including display, search, filtering, sorting, ranking rules, and localization settings.Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.
Usage of AI.
I use cursor for coding help but did manual changes and also did testing locally.