feat: add Dynamic Search Rules API support#798
Conversation
|
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 (8)
📝 WalkthroughWalkthroughAdds experimental dynamic search rules support with typed Rust models, four client endpoints, feature gating, asynchronous task handling, integration tests, and documentation examples. Existing facet-search and UUID error-message tests are also updated. ChangesDynamic search rules
Test compatibility updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Sequence Diagram(s)sequenceDiagram
participant Application
participant Client
participant Meilisearch
participant TaskResponse
Application->>Client: Configure dynamic_search_rules
Client->>Meilisearch: PATCH /experimental-features
Application->>Client: List, get, update, or delete a rule
Client->>Meilisearch: Request dynamic search rule endpoint
Meilisearch-->>Client: Rules or asynchronous task
Client->>TaskResponse: Deserialize task type
TaskResponse-->>Application: TaskInfo or rule result
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 |
Pull Request
Related issue
Fixes #797
What does this PR do?
Added Dynamic Search Rules models, conditions, actions, selectors, filters, and
pagination types.
Added get_dynamic_search_rules for listing and filtering rules.
Added get_dynamic_search_rule for retrieving a rule by UID.
Added update_dynamic_search_rule for creating/updating rules via async tasks.
Added delete_dynamic_search_rule with async-task handling.
Added dynamicSearchRules experimental-feature support.
Added dsrUpdate and dsrClear task parsing.
Added tests for list, get, create, update, delete, filtering, pagination, and tasks.
Added all four requested documentation code samples.
Updated two existing tests for Meilisearch v1.50 and current uuid.
Full result: 198 tests and 201 doctests passing.
Test Steps
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Bug Fixes