elasticsearch 找不到uri[/ModelName]和方法[POST]的处理程序
正在尝试使用Elasticsearch和Tire在heroku产品上部署rails应用程序。 添加了Heroku盆景插件,但仍在运行此命令之后 heroku run rake环境轮胎:导入类=属性力=真 获取错误: 400:找不到uri[/properties]和方法[POST]的处理程序 请帮助调试此错误 这是我的物业模型:elasticsearch 找不到uri[/ModelName]和方法[POST]的处理程序,elasticsearch,heroku,ruby-on-rails-5,tire,elasticsearch,Heroku,Ruby On Rails 5,Tire,正在尝试使用Elasticsearch和Tire在heroku产品上部署rails应用程序。 添加了Heroku盆景插件,但仍在运行此命令之后 heroku run rake环境轮胎:导入类=属性力=真 获取错误: 400:找不到uri[/properties]和方法[POST]的处理程序 请帮助调试此错误 这是我的物业模型: class Property < ApplicationRecord include Tire::Model::Search include Tire::Mod
class Property < ApplicationRecord
include Tire::Model::Search
include Tire::Model::Callbacks
mapping do
indexes :id, type: 'integer'
indexes :country
indexes :city
indexes :province
indexes :holding_type
indexes :price, boost: 10
indexes :created_at, type: 'date'
end
end
这已经是一条Elasticsearch错误消息,因此您正在访问它-只是您的查询不正确 我在这里胡乱猜测:您缺少了
类型
;至少有一种可能会发生这种错误
$ curl -XPOST localhost:9200/properties/ -d '{"foo": "bar"}'
No handler found for uri [/properties/] and method [POST]
附注:轮胎现在不是还没有保养/不推荐使用吗?我认为最好的选择应该是是的,这样可以创建索引
$ curl -XPOST localhost:9200/properties/ -d '{"foo": "bar"}'
No handler found for uri [/properties/] and method [POST]