Repository navigation
Conversation
📝 WalkthroughWalkthroughThe Ruby SDK adds methods for listing, retrieving, upserting, and deleting dynamic search rules. It normalizes nested rule conditions and actions, returns asynchronous tasks for mutations, adds RSpec coverage, and provides Ruby code samples. ChangesDynamic search rules
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RubyClient
participant MeilisearchAPI
participant ModelsTask
RubyClient->>MeilisearchAPI: List or retrieve dynamic search rules
RubyClient->>MeilisearchAPI: Upsert or delete a dynamic search rule
MeilisearchAPI-->>RubyClient: Rule response or task response
RubyClient->>ModelsTask: Wrap asynchronous response as Models::Task
Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/meilisearch/client.rb`:
- Around line 523-536: Update dynamic_search_rule_body and
dynamic_search_rule_conditions so Utils.transform_attributes does not
recursively transform conditions.filter.values; preserve facet keys such as
product_type while continuing to transform only the structural condition fields.
Add an integration case covering an underscored facet name and verify the
generated server filter condition retains the original key.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 192dd0c2-9256-4a69-83f2-830c66c407be
📒 Files selected for processing (3)
.code-samples.meilisearch.yamllib/meilisearch/client.rbspec/meilisearch/client/dynamic_search_rules_spec.rb
Why?
adds ruby client support for the dynamic search rules API introduced in meilisearch v1.50, including the filter condition and lastUpdatedAt response added in v1.51.
closes #708
closes #709
What?
Testing
one unrelated compact integration example is excluded from the broader windows run because index compaction fails on the local windows server.
AI assistance
used codex to help implement the client methods and draft the integration tests. i reviewed the diff and validated it against meilisearch enterprise v1.51.0 locally.
See Also
Changelog
Summary by CodeRabbit