Elasticsearch::Transport::Transport::Errors::BadRequest [400] while creating index
After some investigation the issue was with my initializer. it worked after changing the host.
Elasticsearch::Model.client = Elasticsearch::Client.new host: ENV['ELASTICSEARCH_URL'] || "localhost:9200"
UpdateApparently the configuration works with Elasticsearch 2.4.x.
In my scenario, changing DATABASE_URL format, in .env
or wherever You keep it, from:
DATABASE_URL=postgres:/myapp_development?pool=5
to:
DATABASE_URL=postgresql://user:password@localhost:5432/myapp_development