elasticsearch - No handler found for uri [/ModelName] and method [POST] -
trying deploy rails app on heroku production elasticsearch , tire. heroku bonsai addon added still after running command
heroku run rake environment tire:import class=property force=true
getting error:
400 : no handler found uri [/properties] , method [post]
please debug error?
this property model:
class property < applicationrecord include tire::model::search include tire::model::callbacks mapping indexes :id, type: 'integer' indexes :country indexes :city indexes :province indexes :holding_type indexes :price, boost: 10 indexes :created_at, type: 'date' end end
this bonsai configuration config/initializers/bonsai.rb
env['elasticsearch_url'] = env['bonsai_url']
this elasticsearch error message, reaching — query isn't correct.
i'm taking wild guess here: you're missing type
; @ least that's (one) possibility how run error.
$ curl -xpost localhost:9200/properties/ -d '{"foo": "bar"}' no handler found uri [/properties/] , method [post]
ps: isn't tire unmaintained / deprecated now? think best alternative should https://github.com/elastic/elasticsearch-rails
Comments
Post a Comment