meilisearch / meilisearch/meilisearch-ruby
[Meilisearch v1.50.0] Add Dynamic Search Rules (experimental)
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 224
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Context
Meilisearch v1.50.0 introduces a revamped Dynamic Search Rules (also called "search rules") experimental feature. Search rules allow pinning documents at the top of search results when flexible, condition-based criteria are matched — such as matching query words, empty queries, or time windows.
This is an experimental feature and must be enabled via PATCH /experimental-features with {"dynamicSearchRules": true} before the endpoints are available.
Objective
Update the SDK to support the search rules API.
We want to expose the following endpoints:
- List rules:
POST /dynamic-search-rules - Get a rule:
GET /dynamic-search-rules/{uid} - Create or update a rule:
PATCH /dynamic-search-rules/{uid}(upsert — returns an async task) - Delete a rule:
DELETE /dynamic-search-rules/{uid}(returns an async task)
For more information, consult:
- Search rules overview
- API reference — List rules
- API reference — Update/upsert a rule
- API reference — Delete a rule
Tasks
- Add methods for all four search rules endpoints (
list,get,updateOrCreate,delete) - Add test cases for all new methods, covering:
- Listing rules (with pagination and filtering)
- Retrieving a single rule by UID
- Creating a new rule (upsert)
- Updating an existing rule (upsert)
- Deleting a rule
- Ensuring that
PATCHandDELETEcorrectly return and handle async tasks
- Update
.code-samples.meilisearch.yamlto add examples under the following keys:list_dynamic_search_rules_1— it should match the equivalent documentation sampleget_dynamic_search_rule_1— it should match the equivalent documentation samplepatch_dynamic_search_rule_1— it should match the equivalent documentation sampledelete_dynamic_search_rule_1— it should match the equivalent documentation sample
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 by tracing the existing Ruby SDK methods and tests for comparable API resources, then implement coverage for the four dynamic search rules endpoints described in the issue. Update .code-samples.meilisearch.yaml with the four specified keys, matching the linked documentation samples. Done means all listed endpoint, pagination/filtering, upsert, deletion, and async-task cases are tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100