문제

I would like to get a list of fields that I can query for a certain index in elasticsearch by using nest.

I know I can do a

Get _mapping

via http and that gets me more or less what I want. But I'm a bit stumped by Nest.

I looked in the

Dim _client = New ElasticClient(setting)
Dim mapping = _client.GetMapping(Function(x) x.Index(Of TexCaseElastic)())

but could not really find my way.

도움이 되었습니까?

해결책

I got it. It's in the properties property.

For Each s In mapping.Mapping.Properties
  Console.WriteLine(s.Key.Name)
Next

Where the name of the key is the name of the field.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top