Skip to content

feat: give each site its own Meilisearch index prefix - #105

Merged
geodro merged 2 commits into
mainfrom
feat/meilisearch-per-site-prefix
Oct 29, 2026
Merged

geodro merged 2 commits into
mainfrom
feat/meilisearch-per-site-prefix

Conversation

@geodro

@geodro geodro commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Every Laravel site shares the one lerd Meilisearch, so two projects that index the same model write into the same index, and switching between them means reimporting. The meilisearch mapping now sets SCOUT_PREFIX to the site handle, the same name its database gets, so each site keeps its own indexes on the shared server. It lands the next time lerd env runs for a site, and that site needs one scout:import afterwards.

Symfony had the same sharing problem and a worse one underneath it. The Meilisearch bundle's recipe connects through MEILISEARCH_URL, which the mapping neither detected nor wrote, so a site using the bundle was never pointed at lerd's Meilisearch at all. The mapping now detects and writes MEILISEARCH_URL, and sets MEILISEARCH_PREFIX to the site handle in place of the recipe's shared app_ prefix.

Refs lerd-env/lerd#2386

Every Laravel site shares the one lerd Meilisearch, so two projects that index the same model write into the same index and switching between them means reimporting. The meilisearch mapping now sets SCOUT_PREFIX to the site handle, the same name its database gets, so each site keeps its own indexes on the shared server.
@geodro
geodro requested a review from a team as a code owner October 29, 2026 16:02
…prefix

The Meilisearch bundle's recipe connects through MEILISEARCH_URL, which the mapping neither detected nor wrote, so a site using the bundle was never pointed at lerd's Meilisearch. The mapping now detects and writes MEILISEARCH_URL, and sets MEILISEARCH_PREFIX to the site handle so Symfony sites stop sharing the recipe's app_ prefix.
@geodro geodro changed the title feat(laravel): give each site its own Meilisearch index prefix feat: give each site its own Meilisearch index prefix Oct 29, 2026
@geodro
geodro merged commit 0e26b0c into main Oct 29, 2026
1 check passed
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