使用nest获取elasticsearch中索引的字段列表

chr*_*ie1 2 elasticsearch nest

我想获得一个字段列表,我可以使用nest查询elasticsearch中的某个索引.

我知道我能做到

获取_mapping

通过http,这让我或多或少得到了我想要的东西.但我对Nest有点难过.

我看着了

Dim _client = New ElasticClient(setting)
Dim mapping = _client.GetMapping(Function(x) x.Index(Of TexCaseElastic)())
Run Code Online (Sandbox Code Playgroud)

但真的找不到我的路.

chr*_*ie1 5

我知道了.它在属性属性中.

For Each s In mapping.Mapping.Properties
  Console.WriteLine(s.Key.Name)
Next
Run Code Online (Sandbox Code Playgroud)

其中键的名称是字段的名称.