2016-03-06 72 views
0

你好我想补充elasticsearch映射,但我现在面临一个异常添加上elasticsearch映射使用curl

{“错误”:“InvalidTypeNameException [映射类型名称[映射]不能 下手'']“,”status“:400}

我使用0.99.10版本的elasticSearchIndex。

curl -XPUT 'http://localhost:9200/twitter/_mapping/tweet' -d '{"tweet" : {"properties" : {"message" : {"type" : "string", "store" : true }}}}' 

回答

0

当你在URL中包含的文档类型,你应该通过属性启动有效载荷场,就像这样:

curl -XPUT 'http://localhost:9200/twitter/_mapping/tweet' -d '{"properties" : {"message" : {"type" : "string", "store" : true }}}' 

如上所述here

+0

所以你说我的代码问题 – pankaj12