meilisearch / meilisearch/meilisearch-ruby

[Meilisearch v1.48.0] Add document relations (experimental)

Open
#707 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 introduced document relations as an experimental feature.

Objective

Add support for the document relations settings as an experimental feature. Experimental features should require opt-in by the user. Read the how to guide for more information.

Tasks

  • Add methods to interact with Get foreignKeys, Update foreignKeys, and Reset foreignKeys API endpoints
  • Update the global settings methods to accept and handle the foreignKeys setting
  • Add test cases for all new methods
  • Add code samples in .code-samples.meilisearch.yaml matching the Meilisearch documentation CURL examples:

Resources

Release notes:

  • Meilisearch v1.39 introduced cross-index document hydration via a new foreignKeys index setting. This allows linking documents across indexes so that search results are automatically enriched with related data.
  • Meilisearch v1.42 extended it with document join filtering — the ability to filter search results using the _foreign() filter syntax on related indexes. This requires the foreign key field to also be configured in filterableAttributes.
  • Meilisearch v1.48 refined it by restricting foreign filters to retrieval routes only.

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 with the existing settings methods and their tests, then compare the foreignKeys API endpoints and the linked Meilisearch documentation. Add the three foreignKeys operations, support the setting in global settings, and cover each method with tests. Update .code-samples.meilisearch.yaml under get_foreign_keys_setting_1, update_foreign_keys_setting_1, and reset_foreign_keys_setting_1 to match the documented CURL examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.