elasticsearch - 在 ElasticSearch 文档中将 NonNested 属性更新为嵌套类型
问题描述
我们正在弹性搜索索引中创建一个动态对象。在创建时,我们没有此对象的映射,因此使用nonnested
下面提到的类型创建对象。
"categoriesScore": {
"properties": {
"score": {
"type": "float"
},
"categoryName": {
"type": "text",
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
}
},
"categoryId": {
"type": "long"
}
}
},
所以我们需要nested
为某个nonnested
对象更新属性类型。
我们尝试了下面的代码
await _client.MapAsync<DocumentEntity> (c => c.Index(_index).Type(_type)).ConfigureAwait (false);
我们需要 NEST 查询,以便我们可以将类型更新nonnested
为nested
类型文档
解决方案
推荐阅读
- html - 如何将两个 div 对齐?
- windows-installer - 以编程方式检测正在安装的 MSI 包
- gradle - 在 ABI 的 NDK 工具链文件夹中找不到带有前缀的工具链:mips64el-linux-android Flutter
- r - R中匹配的&符号系列?
- java - 如何在 Spring Boot 中修复“ConditionalOnProperty are Exclusive”?
- javascript - 如何替换 Vue js 数组上的外部 javascript 数组?
- java - Hibernate 复杂的 1+N 问题将同一对象的多个实例提取到结果集中
- git - 使用 git 在本地和产品配置之间切换
- php - 按字段对数组中的数据进行分组 - 均匀排列
- ubuntu - Ubuntu 安装多个 Cuda 工具包版本及其补丁