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

read and uses settings from the original index when settings argument is not given #57

Closed eunjae-lee closed 4 years ago

eunjae-lee commented 4 years ago

If user doesn't pass settings argument, then we need to read the settings from Algolia server and apply them to the new temporary index. Otherwise, the settings will be lost.

https://github.com/algolia/gatsby-plugin-algolia/blob/master/gatsby-node.js#L167

Before this if statement, we could do something like

if (!settings && indexToUse === tempIndex) {
  settings = await index.getSettings()
}

If it's the same index, we don't need to get the whole settings and apply them again.

Haroenv commented 4 years ago

fix released in 0.9.0