Update DSR docs following v1.50#3633
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSearch 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. ChangesSearch rules documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
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 winUpdate missed terminology from
prioritytoprecedence.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 valueFix 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 valueFix 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 valueImprove 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
⛔ Files ignored due to path filters (4)
assets/images/cloud-search-rules/03-manage-rule.pngis excluded by!**/*.pngassets/images/cloud-search-rules/04-add-condition.pngis excluded by!**/*.pngassets/images/cloud-search-rules/05-add-pin.pngis excluded by!**/*.pngassets/images/cloud-search-rules/06-rules-list.pngis excluded by!**/*.png
📒 Files selected for processing (10)
.code-samples.meilisearch.yamlcapabilities/search_rules/advanced/pinning_behavior.mdxcapabilities/search_rules/getting_started.mdxcapabilities/search_rules/how_to/curate_empty_query.mdxcapabilities/search_rules/how_to/list_and_filter_rules.mdxcapabilities/search_rules/how_to/pause_a_rule.mdxcapabilities/search_rules/how_to/pin_multiple_results.mdxcapabilities/search_rules/how_to/pin_one_result_for_query.mdxcapabilities/search_rules/how_to/schedule_promotion.mdxcapabilities/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`). |
There was a problem hiding this comment.
🗄️ 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 2Repository: 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.jsonRepository: 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
doneRepository: 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.
| - **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. |
There was a problem hiding this comment.
📐 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.
| - **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.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Summary by CodeRabbit