Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top