meilisearch / meilisearch/meilisearch-ruby

[Meilisearch v1.50.0] Add Dynamic Search Rules (experimental)

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

Nobody has claimed this yet.

enhancement good first issue
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:

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 PATCH and DELETE correctly return and handle async tasks
  • Update .code-samples.meilisearch.yaml to add examples under the following keys:

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.