三人行必有我师

:No handler found for uri [/http://localhost:9200/library/] and method [PUT]

Elasticsearch | 作者 isme420 | 发布于2017年03月08日 | 阅读数:18196

求助,创建索引
PUT http://localhost:9200/library/
{
"settings":{
"index":{
"number_of_shards":5,
"number_of_replices":1
}
}
}
和创建文档不指定id时:
PUT /.kibana/books/
{
"title" : "elasticsearch",
"name" : {
"frist" : "annie",
"last" : "tong"
},
"price" : "20.00"
}
报:No handler found for uri [/http://localhost:9200/library/] and method [PUT]和No handler found for uri [/.kibana/books/] and method [PUT]错误。。。
已邀请:

kennywu76 - Wood

赞同来自:

第一个错误,既然用PUT,想必命令从restful测试工具发出,后面为何要加上 http://localhost:9200 ?? 命令行下用curl的时候才需要加http地址
 
第二个错误,不指定文档ID的时候应该用POST方法,而不是PUT。
 
这两个问题太初级了,这里问有点不应该。

medcl - 今晚打老虎。

赞同来自:

/后面再加上一个type标识就可以写索引了

要回复问题请先登录注册