The basic premise of this issue was that I kept getting an error saying A replica index is already replica of another index whenever I tried to pass queries into this plugin that contained a replicas array within their settings object.
I found that a solution was to prevent the plugin from trying to attach replica indices to a _tmp index.
I also found that in indexExists, error.status needed to be switched to error.statusCode... apparently error.status was not returning an accurate status code...
I also found that forwardToReplicas was not supported... so, I implemented a quick solution to pass it through to Algolia. In the future, I'm assuming other modifiers will need to be added... So, I created an extraModifiers object to allow for additional property additions, later on.
The basic premise of this issue was that I kept getting an error saying
A replica index is already replica of another index
whenever I tried to pass queries into this plugin that contained a replicas array within theirsettings
object.I found that a solution was to prevent the plugin from trying to attach replica indices to a
_tmp
index.I also found that in
indexExists
,error.status
needed to be switched toerror.statusCode
... apparentlyerror.status
was not returning an accurate status code...I also found that
forwardToReplicas
was not supported... so, I implemented a quick solution to pass it through to Algolia. In the future, I'm assuming other modifiers will need to be added... So, I created anextraModifiers
object to allow for additional property additions, later on.Fixes: https://github.com/algolia/gatsby-plugin-algolia/issues/49