在C中,m×n 2维阵列与长度m×n的1维阵列之间的时间和空间是否存在差异(对于m和n的大值)?使用一维数组访问元素会更快吗?
我正在尝试添加新类型作为现有类型的子类型。从ElasticSearch 文档来看,这看起来是可能的,但没有关于如何做到这一点的详细信息。
文档是这样说的:
这必须在创建索引时完成,或者在创建子类型之前使用更新映射 API 完成。
update-mapping API 文档中没有关于设置父子关系的详细信息。
直觉上,我认为父母已经存在之后就应该允许建立亲子关系,因为父母不需要了解孩子的任何信息。
这是我在小时候创建新类型时遇到的错误:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "can't add a _parent field that points to an already existing type"
}
],
"type": "illegal_argument_exception",
"reason": "can't add a _parent field that points to an already existing type"
},
"status": 400
}
Run Code Online (Sandbox Code Playgroud)