Skip to content

feat: add support for Meilisearch embedder settings #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 10.x
Choose a base branch
from

Conversation

mortezarajabi
Copy link

Summary

This PR adds support for defining Meilisearch index settings for embedders in Laravel Scout.

Embedders are used when implementing vector search or hybrid search in Meilisearch. These settings allow Meilisearch to automatically manage vector generation and similarity ranking using external embedding providers.

The Meilisearch PHP SDK already supports this via this PR.

Benefits

With this change, developers can define embedder configurations per index in their config/scout.php file, similar to other Meilisearch settings:

// config/scout.php

return [
    // ... other settings

    'meilisearch' => [
        'host' => env('MEILISEARCH_HOST', 'http://localhost:7700'),
        'key' => env('MEILISEARCH_KEY'),

        'index-settings' => [
            'products' => [
                'searchableAttributes' => ['name', 'description'],
                'filterableAttributes' => ['category', 'price'],

                'embedders' => [
                    'default' => [
                        'source' => 'openAi',
                        'apiKey' => env('OAI_API_KEY'),
                        'model' => 'text-embedding-3-small',
                        'dimensions' => 1536,
                        'distribution' => [
                            'mean' => 0.7,
                            'sigma' => 0.3,
                        ],
                    ],
                ],
            ],
        ],
    ],

    // ... other settings
];

@mortezarajabi mortezarajabi changed the title feat: add Meilisearch engine index settings support for embedders feat: add support for Meilisearch embedder settings Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant