meilisearch / meilisearch/meilisearch-python
[Meilisearch v1.51.0] Add filter condition to Dynamic Search Rules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 602
- Forks
- 118
- Avg merge
- 4h 44m
- Merged PRs (30d)
- 1
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 with the SDK implementation for dynamic search rules and the request/response handling for PATCH /dynamic-search-rules/{:ruleUid}, GET /dynamic-search-rules/{:ruleUid}, and POST /dynamic-search-rules. Check the release notes and API reference for the expected shapes, then add coverage for the filter condition and lastUpdatedAt response field. Done means both behaviors are accepted and returned correctly by the SDK tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100