Closed straight-shoota closed 8 years ago
Oh you're right. It pushes to a _tmp
index and then rename it to do an atomic replacement, so it means your key should have acces to both indices (using *
wildcard, as you suggested).
Thanks for the report, I'll add a notice to the readme and try to provide better error messages :)
I've update the readme, and pushed v0.6.1
to RubyGems that adds the following error message if it detects that the key does not have access to the _tmp
index.
Thanks for the report and for helping me make this plugin better :)
My first steps combining jekyll with algolia resulted in the following error message:
When I tried to put some settings with curl there was no problem, neither with directly using the ruby lib. Only after replaying the exact same requests with curl I figured that my API key simply has no access to the temporary index
"#{index_name}_tmp"
which is automatically used by this gem. My solution was to manually create the temporary index and issue a new API key with access to both the main and temporary indices (using a wildcard should also be possible).This is of course not an issue for unrestricted API keys. But when you want to restrict your API key to specific indices, this behaviour requires some special attention. I'd suggest to put a notice in the README and maybe provide a error message with a hint in case
index.set_settings
fails with a 403.