gpt4 book ai didi

elasticsearch - 设置映射时的弹性误差

转载 作者:行者123 更新时间:2023-12-03 01:59:52 27 4
gpt4 key购买 nike

尝试设置映射时出现此错误。

只能在某些xcontent字节或压缩的xcontent字节上调用Compressor检测

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();

最佳答案

您可以打印请求正文并在命令行中尝试吗?尝试打印此:

client.admin().indices()
.preparePutMapping("mydocuments")
.setType("mytype")
.setSource(mapping)

关于elasticsearch - 设置映射时的弹性误差,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33726961/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com