meilisearch / meilisearch/meilisearch-rust

[Meilisearch v1.51.0] Add filter condition to Dynamic Search Rules

Open
#800 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Rust
Stars
434
Forks
114
PR merge metrics
No merged PRs in 30d

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 filter activation condition in the conditions object of a DSR. The filter condition contains a values key whose value is a JSON object mapping facet names to their expected filter values.
  • The new lastUpdatedAt field returned by GET /dynamic-search-rules/{:ruleUid} and POST /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 conditions parameter to accept the new filter condition type
  • Add the lastUpdatedAt field (ISO datetime string) to the API response shape
  • Add tests for:
    • Creating/updating a DSR with a filter condition
    • Reading a DSR response containing lastUpdatedAt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SDK types and tests for Dynamic Search Rules and the conditions object. Use the v1.51.0 release notes and the provided filter-condition example to cover creating or updating a rule, then verify that responses from GET and POST dynamic-search-rules preserve the ISO datetime lastUpdatedAt field. Done means both behaviors are represented by passing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.