Repository navigation
feat: give each site its own Meilisearch index prefix - #105
Merged
Merged
Conversation
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.
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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