Each of the Kibana Console examples has a dropdown menu at the bottom of the code block that allows switching to another language:
switching language will switch all code blocks to that language, and the preference will be stored locally so that the page will default to this language in future.
The client tries to map as closely to the underlying Elasticsearch API JSON structure as possible. For example, using the fluent lambda expression syntax:
var client = new ElasticClient();
var searchResponse = client.Search<Document>(s => s
.Query(q => q
.Match(m => m
.Field(f => f.Path)
.Query("value")
)
)
.Sort(so => so
.Field("_score", SortOrder.Descending)
)
);
maps to
{
"query": {
"match": {
"path": {
"query": "value"
}
}
},
"sort": [{
"_score": {
"order": "desc"
}
}]
}
You can always use the low level client API and send JSON too, returning a high level response when using the low level client exposed on the high level client:
var lowLevelResponse = client.LowLevel.Search<SearchResponse<Document>>("documents", @"
{
""query"": {
""match"": {
""path"": {
""query"": ""value""
}
}
},
""sort"": [{
""_score"": {
""order"": ""desc""
}
}]
}");