Skip to content

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

Description

@Strift

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions