I reainstalled my Bonsai-Elasticsearch addon on Heroku due recent lack of use. It used to work well before but now when I type this in my rails console:
Lead.__elasticsearch__.create_index! force:true
I get this error:
Elasticsearch::Transport::Transport::Errors::BadRequest ([400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."}],"type":"illegal_argument_exception","reason":"The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."},"status":400})
How can I fix this issue?
versions: Rails: 5.2.2 Ruby: 2.6.3 elasticsearch-model: 6.0.0 elasticsearch-rails: 6.0.0