Add dynamic search rules support#1265
Conversation
Expose the v1.50 experimental endpoints with typed responses and task metadata so callers can list, retrieve, upsert, and delete rules. Cover the released API contract with integration tests and executable documentation samples. Co-Authored-By: Codex <codex@openai.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe SDK adds typed dynamic search rule models, route configuration, four client methods, experimental-feature test setup, lifecycle coverage, and documentation samples for listing, retrieving, updating, and deleting rules. ChangesDynamic Search Rules
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant Meilisearch
participant TaskService
Client->>Meilisearch: List or retrieve dynamic search rules
Client->>Meilisearch: Upsert or delete a rule
Meilisearch-->>Client: SearchRule, SearchRulesResults, or TaskInfo
Client->>TaskService: Wait for asynchronous task
TaskService-->>Client: Completed task
Possibly related issues
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Strift
left a comment
There was a problem hiding this comment.
Hello @fjbarrett and thank you for this PR 🙌 LGTM!
What changed
Verification
uv run pytest tests(374 passed, 5 skipped against Meilisearch v1.50.0, commit2ecfd54)uv run mypy meilisearchuv run ruff check meilisearch testsuv run ruff format --check meilisearch testsyamllint .code-samples.meilisearch.yamlAPI schema note
The current documentation PATCH sample uses
priorityand an array-shapedconditions. The released v1.50.0 binary rejects that payload; it acceptsprecedenceand an object withquery/timeconditions. The Python sample follows the released server contract. I recorded the mismatch on #1264 for confirmation.AI assistance
OpenAI Codex assisted with API research, implementation, tests, and the initial PR text. I reviewed every changed line, ran the complete test suite against the v1.50.0 binary, and take responsibility for the contribution.
Closes #1264
Summary by CodeRabbit