I've setup a new development environment on my iMac and moved my rails app from a macbook air. It was working fine and indexing the data as well. Using the same version of gems. When indexing it gives following error.
Searchkick::ImportError: {"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"} on item with id '74'
Is there any way I can solve this issue by modifying my elasticsearch.yml?
This solution from salihsagdilekon on https://github.com/ankane/searchkick/issues/1040 resolved this same issue for me:
curl -XPUT -H "Content-Type: application/json" > http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
I had the same issue today, and the following worked for me:
Model.search_index.clean_indices
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With