Skip to content

[5.x] Add algolia prefix option - #10536

Closed
bastihilger wants to merge 3 commits into
statamic:5.xfrom
bastihilger:add-algolia-prefix-option
Closed

[5.x] Add algolia prefix option#10536
bastihilger wants to merge 3 commits into
statamic:5.xfrom
bastihilger:add-algolia-prefix-option

Conversation

@bastihilger

@bastihilgerbastihilger commented Jul 31, 2024

Copy link
Copy Markdown
Contributor

In Algolia it is common to have one "Application" with different indexes for different environments. These indexes can be prefixed, like

  • "local_pages", "production_pages", "staging_pages"
  • "local_products", "production_products", "staging_products"

and so on.

Laravel scout has an easy solution for this by adding a "prefix" option in the scout config file.

My PR adds a similar solution by having an option in the Statamic search config file in the drivers.algolia array.

Closesstatamic/ideas#1202

@jasonvarga

jasonvarga commented Jul 31, 2024

Copy link
Copy Markdown
Member

I believe this other PR is attempting to solve the same problem: #10435

We can leave this open and we will review both and decide the more appropriate option. Thanks!

@bastihilger

Copy link
Copy Markdown
ContributorAuthor

@jasonvarga I did not see that PR. I'd be happy if one of the two got merged ;-)

@jasonvarga

Copy link
Copy Markdown
Member

On the other PR a good point was made that this sort of functionality would not necessarily be needed only by Algolia. #10435 will address it in a driver-agnostic way. We can continue over there.

Sign up for freeto 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.

Add option for Algolia search index prefix

2 participants

@bastihilger@jasonvarga