【发布时间】:2018-11-17 06:08:24
【问题描述】:
我有一个弹性搜索索引,其映射如下:
{
"indexName": {
"mappings": {
"vault": {
"properties": {
"someMapping": {
"dynamic": "true",
"properties": {
"A": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"B": {
"type": "float"
},
"C": {
"type": "float"
}
}
}
}
}
}
}
}
我需要获取嵌套映射的类型,例如:
[
{Name = "A", Type = "text"},
{Name = "B", Type = "float"},
{Name = "C", Type = "float"}
]
我需要通过 .NET Core 应用程序中的 NEST API 来实现这一点。
到目前为止,我已经尝试了elasticClient.GetMapping(new GetMappingRequest()),但没有取得多大成功,因为我无法访问我需要的字段的嵌套属性(在本例中为“someMapping”)
【问题讨论】:
标签: asp.net elasticsearch asp.net-core nest elasticsearch-5