algolia / gatsby-plugin-algolia

A plugin to push to Algolia based on graphQl queries
https://yarn.pm/gatsby-plugin-algolia
Apache License 2.0
178 stars 45 forks source link

Synonyms reset after gatsby build #90

Closed cameronmcefee closed 3 years ago

cameronmcefee commented 4 years ago

We've noticed that when we configure synonyms via the web UI, upon a gatsby build the list resets. Could this plugin be doing that? I noticed that there's a scopedCopyIndex method that seems like it might be intended to preserve synonyms but it doesn't appear to be in use so far as I can tell.

Haroenv commented 4 years ago

That seems to be right, as a temporary workaround, you can use the enablePartialUpdates option, which doesn't have the issue, since it doesn't copy indices

cameronmcefee commented 4 years ago

Ah great, thanks, I'll check that out.

Haroenv commented 3 years ago

rules and synonyms are copied int he non-partial version now: https://github.com/algolia/gatsby-plugin-algolia/blob/master/gatsby-node.js#L355 since version 0.21.0