meilisearch / meilisearch/meilisearch-php
[Meilisearch v1.51.0] Add filter condition to Dynamic Search Rules
Open
Nobody has claimed this yet.
enhancement
good first issue
- Dominant language
- PHP
- Stars
- 757
- Forks
- 125
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 2
Description
Context
Meilisearch v1.51.0 introduces filter conditions for Dynamic Search Rules (DSR). It also introduces a new lastUpdatedAt field in DSR responses.
Objective
Update the SDK to support:
- The new
filteractivation condition in theconditionsobject of a DSR. Thefiltercondition contains avalueskey whose value is a JSON object mapping facet names to their expected filter values. - The new
lastUpdatedAtfield returned byGET /dynamic-search-rules/{:ruleUid}andPOST /dynamic-search-rules.
Use these resources:
Example of a DSR with a filter condition
// PATCH /dynamic-search-rules/test-filter
{
"conditions": {
"filter": {
"values": {
"color": "red",
"category": "shirt"
}
}
},
"actions": [
{
"selector": {
"indexUid": "products",
"id": "123"
},
"action": { "type": "pin", "position": 1 }
}
]
}
Tasks
- Update the
conditionsparameter to accept the newfiltercondition type - Add the
lastUpdatedAtfield (ISO datetime string) to the API response shape - Add tests for:
- Creating/updating a DSR with a
filtercondition - Reading a DSR response containing
lastUpdatedAt
- Creating/updating a DSR with a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the SDK definitions for dynamic search rule conditions and response objects, then find the existing tests for creating, updating, and reading DSRs. Add coverage for the filter condition and lastUpdatedAt response field, and run the relevant test suite to verify both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100