Javascript 如何在Elasticsearch 1.4中将类型从对象更改为嵌套
目前,我的映射如下所示Javascript 如何在Elasticsearch 1.4中将类型从对象更改为嵌套,javascript,node.js,
elasticsearch,Javascript,Node.js,
elasticsearch,目前,我的映射如下所示 hal: { properties: { debug: { type: "string", fields: { raw: { type: "string", index: "not_analyzed" } } },
hal: {
properties: {
debug: {
type: "string",
fields: {
raw: {
type: "string",
index: "not_analyzed"
}
}
},
label: {
type: "string",
fields: {
raw: {
type: "string",
index: "not_analyzed"
}
}
},
score: {
type: "double"
},
sentiment: {
type: "double"
},
type: {
type: "string",
index: "not_analyzed"
}
}
},
但是根据我的研究,我需要它是类型嵌套的
,否则我不能使用术语
和范围
的组合,因为元素是扁平的。我似乎找不到任何关于如何更改映射类型的文档
我该怎么做?我正在使用JavaScript elasticsearch npm模块 你解决了吗?我还没解决。但是我重新为整个集群编制了索引,我发现如果不删除文档,就无法更改映射。可以添加字段,但不能将现有字段修改为其他类型