Skip to content

Add dynamic search rule filter support - #1268

Draft
kangazhan wants to merge 1 commit into
meilisearch:mainfrom
kangazhan:agent/add-dsr-filter-condition
Draft

Add dynamic search rule filter support#1268
kangazhan wants to merge 1 commit into
meilisearch:mainfrom
kangazhan:agent/add-dsr-filter-condition

Conversation

@kangazhan

@kangazhan kangazhan commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • parse the new lastUpdatedAt dynamic search rule response field as a Python datetime
  • cover filter activation conditions with an API round-trip test
  • keep responses from older Meilisearch versions compatible when lastUpdatedAt is absent

Fixes #1267

Validation

  • .venv\Scripts\pytest.exe -q tests\models\test_search_rule.py tests\client\test_client_dynamic_search_rules_meilisearch.py (8 passed)
  • .venv\Scripts\ruff.exe check meilisearch\models\search_rule.py tests\models\test_search_rule.py tests\client\test_client_dynamic_search_rules_meilisearch.py
  • .venv\Scripts\ruff.exe format --check meilisearch\models\search_rule.py tests\models\test_search_rule.py tests\client\test_client_dynamic_search_rules_meilisearch.py
  • .venv\Scripts\mypy.exe meilisearch
  • full local suite: 374 passed, 5 skipped, 3 environment-specific failures; the same three failures reproduce on an untouched origin/main worktree (two require the CI Enterprise image and one is affected by local HTTP interception)

AI disclosure

OpenAI Codex was used to draft the model and test changes; I reviewed the diff and verified the behavior with the checks above.

Summary by CodeRabbit

  • New Features

    • Search rules now include an optional “last updated” timestamp.
    • Timestamp values are automatically converted to standard date-time objects.
    • Dynamic search rules support filter-based conditions when updating rules.
  • Bug Fixes

    • Improved consistency when retrieving dynamic search rules with pagination or filters.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e9851efc-109b-4b19-bc59-710663053ba9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant