尝试设置映射我收到此错误..弹性错误而设置映射
压缩机检测只能叫上一些xcontent字节或压缩xcontent字节
XContentBuilder mapping = XContentFactory.jsonBuilder()
.startObject("mydocuments")
.startObject("mytype")
.startObject("properties")
.startObject("blob_field")
.field("type", "string")
.field("index", "not_analyzed")
.endObject()
.endObject()
.endObject()
.endObject();
PutMappingResponse putMappingResponse = client.admin().indices()
.preparePutMapping("mydocuments")
.setType("mytype")
.setSource(mapping)
.execute().actionGet();
@ user3549576你可以试试这个吗? – Val