R.J. Robinson
R.J. Robinson

Reputation: 2240

Searchkick Elasticsearch throwing a 400 error

I recently updated to High Seirra, not sure if that means anything, and I am now getting this error when I try to reindex the Active Record Model.

Things I have tried. I have reinstalled RVM, Ruby, Elasticsearch. Still getting the same errors.

Others on my team did the same upgrade, and they are running just fine. Below is the error I am getting.

Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: Could not convert [word_start.index] to boolean"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: Could not convert [word_start.index] to boolean","caused_by":{"type":"illegal_argument_exception","reason":"Could not convert [word_start.index] to boolean","caused_by":{"type":"illegal_argument_exception","reason":"Failed to parse value [analyzed] as only [true] or [false] are allowed."}}},"status":400}
from /Users/rrobin244/.rvm/gems/ruby-2.3.3/gems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/base.rb:202:in `__raise_transport_error'

Upvotes: 1

Views: 1978

Answers (2)

Sahil Z. Maharjan
Sahil Z. Maharjan

Reputation: 76

Check your Gemfile.lock and check the version of the elasticsearch there. If it does not match with the version of elasticsearch in your local system, delete the gemfile.lock file and run the bundle. This fixed the issue for me.

Upvotes: 5

mobject
mobject

Reputation: 179

I had same problem and I had to upgrade elasticsearch on my Mac

brew upgrade elasticsearch

Upvotes: 2

Related Questions