feat: add filter condition to dynamic search rules - #987
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthrough
ChangesDynamic Search Rule support
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Test
participant API
participant Task
Test->>API: Create rule with red filter
API->>Task: Process create
Task-->>API: Completed
API-->>Test: Rule with conditions and lastUpdatedAt
Test->>API: Update rule with blue filter
API->>Task: Process update
Task-->>API: Completed
API-->>Test: Updated rule with conditions and lastUpdatedAt
Suggested labels: Suggested reviewers: 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 |
Strift
left a comment
There was a problem hiding this comment.
Hello @zshs000 and thanks for your contribution.
Just a few things before we can merge:
- See review comments
- Update
.code-samples.meilisearch.yaml:patch_dynamic_search_rule_1sample must use the newMap<String, Object>format for conditions
- Rename dynamic search rule priority to precedence and update tests - Update the dynamic search rule code sample to use Map conditions
|
Hi @Strift, I’ve addressed the requested changes:
The changes have been pushed. Could you please take another look when you have time? Thanks! |
Strift
left a comment
There was a problem hiding this comment.
Thanks for the follow-up 🙌 LGTM!
Pull Request
Related issue
Fixes #986
What does this PR do?
DynamicSearchRule.conditionstype fromList<Map<String, Object>>toMap<String, Object>to align with Meilisearch v1.50.0 API changesfiltercondition in dynamic search rules (Meilisearch v1.51.0)lastUpdatedAtfield toDynamicSearchRulelastUpdatedAtdeserializationAI usage disclosure: Test cases in
DynamicSearchRulesTest.javaandDynamicSearchRuleTest.javawere generated with Codex and then manually reviewed and adjusted.PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
conditions, including nested query/time and filter values.lastUpdatedAttimestamp.conditionsstructure.prioritytoprecedence.conditionsformat.