Skip to content

Update DSR docs following v1.50#3633

Merged
curquiza merged 4 commits into
mainfrom
update-dsr-50
Jul 23, 2026
Merged

Update DSR docs following v1.50#3633
curquiza merged 4 commits into
mainfrom
update-dsr-50

Conversation

@dureuill

@dureuill dureuill commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
  • Update screenshots with new UI
  • Update all DSR code samples with the new API
  • Update documentation text to reflect the changes in behavior:
    • renaming of "priority" to "precedence" in the API and "rank" in the UI
    • async task rather than immediate update/creation
    • no longer a list of condition but up to 1 condition of each kind
    • semantic changes from contains a substring to contains words in the Meilisearch sense

Summary by CodeRabbit

  • Documentation
    • Updated Search rules guides to reflect the latest dashboard terminology, including Rank and Precedence.
    • Revised API examples to use the current nested conditions format for query and time-based rules.
    • Clarified rule matching, precedence, storage scope, filtering, asynchronous updates, and promotion scheduling behavior.
    • Updated guidance for empty queries, pinned results, pausing rules, and listing or auditing rules.
    • Corrected example payloads and responses throughout the Search rules documentation.

@dureuill
dureuill requested a review from a team as a code owner July 20, 2026 15:02
@dureuill
dureuill requested a review from qdequele July 20, 2026 15:03
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 21b5e117-c844-4fed-8486-9deaec1a2939

📥 Commits

Reviewing files that changed from the base of the PR and between e53107e and 05be0ab.

📒 Files selected for processing (2)
  • capabilities/search_rules/how_to/list_and_filter_rules.mdx
  • capabilities/search_rules/how_to/schedule_promotion.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • capabilities/search_rules/how_to/schedule_promotion.mdx

📝 Walkthrough

Walkthrough

Search rules documentation and examples now use structured query/time conditions, word matching, precedence terminology, current dashboard controls, filtering semantics, and asynchronous task behavior for rule updates.

Changes

Search rules documentation

Layer / File(s) Summary
Rule matching and precedence semantics
capabilities/search_rules/overview.mdx, capabilities/search_rules/advanced/pinning_behavior.mdx, capabilities/search_rules/how_to/curate_empty_query.mdx
Conditions, word matching, precedence defaults, cross-index targeting, and empty-query behavior use updated terminology and semantics.
Dashboard condition workflows
capabilities/search_rules/getting_started.mdx, capabilities/search_rules/how_to/*
Dashboard instructions use the current Query, Time, Empty query, Query words, Rank, and Time Range controls.
Structured API condition examples
.code-samples.meilisearch.yaml, capabilities/search_rules/getting_started.mdx, capabilities/search_rules/how_to/*
API examples and stored payloads use nested query/time condition objects, including words and isEmpty.
Rule listing, updates, and operational behavior
capabilities/search_rules/how_to/list_and_filter_rules.mdx, capabilities/search_rules/how_to/pause_a_rule.mdx, capabilities/search_rules/how_to/pin_one_result_for_query.mdx, capabilities/search_rules/how_to/schedule_promotion.mdx
Guides describe precedence fields, query filtering, asynchronous updates, reactivation timing, competing rules, and promotion auditing.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • meilisearch/meilisearch-php#932 — Covers the same Dynamic Search Rules schema and behavior updates for the PHP SDK.
  • meilisearch/meilisearch-go#802 — Covers matching Dynamic Search Rules API changes for the Go SDK.
  • meilisearch/meilisearch-dotnet#749 — Covers the same v1.50 Dynamic Search Rules changes for the .NET SDK.

Suggested labels: fix/improvement

Suggested reviewers: qdequele

Poem

I’m a rabbit with docs in my den,
Nested conditions bloom again.
Words hop softly, ranks align,
Time windows keep rules in line.
Async tasks thump—what a delight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main purpose: updating dynamic search rule docs for the v1.50 API/UI changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-dsr-50

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.

@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
meilisearch-documentation 🟢 Ready View Preview Jul 20, 2026, 3:05 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
capabilities/search_rules/how_to/pause_a_rule.mdx (1)

58-60: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update missed terminology from priority to precedence.

Line 59 still uses the old "priority" terminology, missing the update applied elsewhere in the PR (such as line 81 in this same file).

💡 Proposed fix
 - It remains stored and visible in `GET /dynamic-search-rules/{uid}` and `POST /dynamic-search-rules`
-- Its conditions, actions, priority, and description are unchanged
+- Its conditions, actions, precedence, and description are unchanged
 - It is skipped at search time, no pin is inserted
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capabilities/search_rules/how_to/pause_a_rule.mdx` around lines 58 - 60,
Update the terminology in the pause-rule documentation bullet to use
“precedence” instead of “priority,” matching the updated wording elsewhere in
the same document, including the section around line 81.
🧹 Nitpick comments (3)
capabilities/search_rules/how_to/list_and_filter_rules.mdx (2)

38-38: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix comma splice.

The second sentence contains a comma splice. As per coding guidelines, use semicolons sparingly and prefer separate sentences.

💡 Proposed fix
-The dashboard list is designed for a moderate number of rules. If you need to search by description or by active state across many rules, use the API instead. The dashboard is good for spot checks, the API is good for audits.
+The dashboard list is designed for a moderate number of rules. If you need to search by description or by active state across many rules, use the API instead. The dashboard is good for spot checks. The API is good for audits.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capabilities/search_rules/how_to/list_and_filter_rules.mdx` at line 38,
Update the second sentence in the dashboard/API guidance to replace the comma
splice with separate sentences, preserving the existing meaning and wording as
much as possible.

Source: Coding guidelines


59-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix comma splice and unify quotation formatting.

  • Line 59 contains a comma splice (version, keep). Split it into two sentences.
  • Line 60 uses double quotes for "promo" but backticks for `seasonal`. Use backticks for both to remain consistent.
💡 Proposed fixes
-- `offset` and `limit` control pagination. Defaults are `offset: 0` and `limit: 20`. The maximum `limit` varies by Meilisearch version, keep requests under a few hundred rules per call.
-- `filter.query` accepts a string query. `promo` returns every rule whose description contains the words "promo". `seasonal` returns every rule whose description contains the word `seasonal`. The search rules applied are similar to a search in a regular index.
+- `offset` and `limit` control pagination. Defaults are `offset: 0` and `limit: 20`. The maximum `limit` varies by Meilisearch version. Keep requests under a few hundred rules per call.
+- `filter.query` accepts a string query. `promo` returns every rule whose description contains the word `promo`. `seasonal` returns every rule whose description contains the word `seasonal`. The search rules applied are similar to a search in a regular index.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capabilities/search_rules/how_to/list_and_filter_rules.mdx` around lines 59 -
60, Update the pagination sentence near the offset and limit documentation to
split “version, keep” into two sentences. In the filter.query examples, use
backticks consistently for both `promo` and `seasonal`.

Source: Coding guidelines

capabilities/search_rules/how_to/pause_a_rule.mdx (1)

63-63: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Improve readability of the reactivation behavior.

The phrase "from the next search request on" is slightly clunky. Consider a smoother phrasing.

💡 Proposed fix
-When a rule is reactivated, it fires again from the next search request on, as soon as the corresponding asynchronous task has been processed.
+When a rule is reactivated, it fires again starting with the next search request, as soon as the corresponding asynchronous task has been processed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capabilities/search_rules/how_to/pause_a_rule.mdx` at line 63, Improve the
reactivation sentence in the pause-a-rule documentation by replacing the clunky
phrase “from the next search request on” with smoother wording, while preserving
that the rule fires again starting with the next search request after its
asynchronous task is processed.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@capabilities/search_rules/getting_started.mdx`:
- Line 51: Correct the route reference in the “Prefer the API?” sentence so it
points to `/dynamic-search-rules` (or the appropriate API endpoint) instead of
the malformed `/"end": "2025-11-28T23:59:59Z"` text, while preserving the
surrounding guidance.

In `@capabilities/search_rules/how_to/list_and_filter_rules.mdx`:
- Line 63: Revise the sentence in the filter-combination example to correct the
“whose containing” grammar and remove the unnecessary word “exactly,” while
preserving the intended meaning about active rules containing “promo” and the
campaign-audit case.
- Line 80: Update the “Priority conflicts” list-item heading in the rules
documentation to use “Precedence conflicts,” matching the API terminology and
the paragraph’s existing precedence references.
- Line 55: Update the OpenAPI contract and list_rules examples to use precedence
instead of priority, keeping the rule structure consistent with the documented
fields and the response description.

In `@capabilities/search_rules/how_to/schedule_promotion.mdx`:
- Line 91: Update the timestamp-format documentation in schedule_promotion.mdx
to remove the outdated scope: "time" reference and describe the current time
object payload structure instead. Ensure the documentation no longer implies an
array of scope fields.

---

Outside diff comments:
In `@capabilities/search_rules/how_to/pause_a_rule.mdx`:
- Around line 58-60: Update the terminology in the pause-rule documentation
bullet to use “precedence” instead of “priority,” matching the updated wording
elsewhere in the same document, including the section around line 81.

---

Nitpick comments:
In `@capabilities/search_rules/how_to/list_and_filter_rules.mdx`:
- Line 38: Update the second sentence in the dashboard/API guidance to replace
the comma splice with separate sentences, preserving the existing meaning and
wording as much as possible.
- Around line 59-60: Update the pagination sentence near the offset and limit
documentation to split “version, keep” into two sentences. In the filter.query
examples, use backticks consistently for both `promo` and `seasonal`.

In `@capabilities/search_rules/how_to/pause_a_rule.mdx`:
- Line 63: Improve the reactivation sentence in the pause-a-rule documentation
by replacing the clunky phrase “from the next search request on” with smoother
wording, while preserving that the rule fires again starting with the next
search request after its asynchronous task is processed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fbb88d87-1cbb-4189-9341-1a7bd7a8370f

📥 Commits

Reviewing files that changed from the base of the PR and between ecb5d58 and e53107e.

⛔ Files ignored due to path filters (4)
  • assets/images/cloud-search-rules/03-manage-rule.png is excluded by !**/*.png
  • assets/images/cloud-search-rules/04-add-condition.png is excluded by !**/*.png
  • assets/images/cloud-search-rules/05-add-pin.png is excluded by !**/*.png
  • assets/images/cloud-search-rules/06-rules-list.png is excluded by !**/*.png
📒 Files selected for processing (10)
  • .code-samples.meilisearch.yaml
  • capabilities/search_rules/advanced/pinning_behavior.mdx
  • capabilities/search_rules/getting_started.mdx
  • capabilities/search_rules/how_to/curate_empty_query.mdx
  • capabilities/search_rules/how_to/list_and_filter_rules.mdx
  • capabilities/search_rules/how_to/pause_a_rule.mdx
  • capabilities/search_rules/how_to/pin_multiple_results.mdx
  • capabilities/search_rules/how_to/pin_one_result_for_query.mdx
  • capabilities/search_rules/how_to/schedule_promotion.mdx
  • capabilities/search_rules/overview.mdx

```

The response contains the rules that match, with the same structure you used to create them (`uid`, `conditions`, `actions`, `priority`, `active`, `description`).
The response contains the rules that match, with the same structure you used to create them (`uid`, `conditions`, `actions`, `precedence`, `active`, `description`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify if `priority` was completely replaced with `precedence` in the OpenAPI specification.

rg '"priority"' assets/open-api/meilisearch-openapi-mintlify.json -B 2 -A 2

Repository: meilisearch/documentation

Length of output: 1340


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n--- capabilities/search_rules/how_to/list_and_filter_rules.mdx (around line 55) ---\n'
sed -n '45,65p' capabilities/search_rules/how_to/list_and_filter_rules.mdx

printf '\n--- OpenAPI priority/precedence references ---\n'
rg -n '"priority"|"precedence"' assets/open-api/meilisearch-openapi-mintlify.json

Repository: meilisearch/documentation

Length of output: 1577


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for line in 1109 1209 1401 16732 18961 22313; do
  start=$((line-8))
  end=$((line+12))
  printf '\n--- around line %s ---\n' "$line"
  sed -n "${start},${end}p" assets/open-api/meilisearch-openapi-mintlify.json
done

Repository: meilisearch/documentation

Length of output: 5640


Update the OpenAPI spec to precedence The API reference still exposes priority in the list_rules examples and schema, so the docs and contract are out of sync.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capabilities/search_rules/how_to/list_and_filter_rules.mdx` at line 55,
Update the OpenAPI contract and list_rules examples to use precedence instead of
priority, keeping the rule structure consistent with the documented fields and
the response description.

Comment thread capabilities/search_rules/how_to/list_and_filter_rules.mdx Outdated
- **Rules per index**: the list response includes each rule's actions, so you can group by `selector.indexUid` locally to see how many pins target each index.
- **Scheduled promotions**: list every rule whose conditions contain a `time` scope with a `start` in the future. This is a good sanity check before a campaign goes live.
- **Priority conflicts**: list rules that share a `contains` value and compare their `priority` values. If two rules have the same priority and target different documents for the same query, ordering is not guaranteed.
- **Priority conflicts**: list rules that share a `words` value and compare their `precedence` values. If two rules have the same precedence and target different documents for the same query, ordering is not guaranteed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update heading to reflect the new precedence terminology.

Since "priority" was renamed to "precedence" in the API and throughout this paragraph, the list item heading should be updated accordingly to prevent confusion.

💡 Proposed fix
-- **Priority conflicts**: list rules that share a `words` value and compare their `precedence` values. If two rules have the same precedence and target different documents for the same query, ordering is not guaranteed.
+- **Precedence conflicts**: list rules that share a `words` value and compare their `precedence` values. If two rules have the same precedence and target different documents for the same query, ordering is not guaranteed.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Priority conflicts**: list rules that share a `words` value and compare their `precedence` values. If two rules have the same precedence and target different documents for the same query, ordering is not guaranteed.
- **Precedence conflicts**: list rules that share a `words` value and compare their `precedence` values. If two rules have the same precedence and target different documents for the same query, ordering is not guaranteed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@capabilities/search_rules/how_to/list_and_filter_rules.mdx` at line 80,
Update the “Priority conflicts” list-item heading in the rules documentation to
use “Precedence conflicts,” matching the API terminology and the paragraph’s
existing precedence references.

Comment thread capabilities/search_rules/how_to/schedule_promotion.mdx Outdated
@mintlify

mintlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
meilisearch-documentation 🟡 Building Jul 20, 2026, 3:02 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@curquiza
curquiza added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit cdbaa8f Jul 23, 2026
3 checks passed
@curquiza
curquiza deleted the update-dsr-50 branch July 23, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants