[英]Setting up elasticsearch on windows os?
我已经看过ES的教程,但是无法在系统上对其进行配置。
我安装了ES,cURL,JSON视图,并且工作正常。 我无法安装Chrome的Sense插件,因为它说已引起惊奇,并且从那里没有下载链接。
我试过了:
curl -X PUT "localhost:9200/test_idx_1x"
并创建索引。 然后我尝试了:
curl -X PUT "localhost:9200/test_idx_1x/test_mapping_1x/_mapping" -d '{
"test_mapping_1x": {
"properties": {
"my_attachments": {
"type": "attachment"
}
}
}
}'
它抛出NullPointerException
。
运行平面文件ES需要做些什么,有人可以通过简单的步骤指导我吗?
错误:
2014-03-20 12:01:02,517][DEBUG][action.admin.indices.mapping.put] [Madelyne Pryor] failed to put mappings on indices [[test_idx_1x]], type [test_mapp
ng_1x]
ava.lang.NullPointerException
at org.elasticsearch.common.xcontent.XContentFactory.xContent(XContentFactory.java:117)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:113)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:101)
at org.elasticsearch.index.mapper.DocumentMapperParser.parseCompressed(DocumentMapperParser.java:177)
at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:387)
at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:377)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$5.execute(MetaDataMappingService.java:540)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:308)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor
java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
还要在命令中添加标题:
-H "Content-Type: application/json"
如果仍然无法使用,请用双引号而不是单引号将json包装起来。 例如:
-d "{\"test_mapping_1x\" :\"...\"}"
尝试从Windows上的Git Bash shell进行映射时出现此错误。
在Windows cmd.exe中本机运行的同一命令运行良好(不好)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.