In the documentation here https://www.elastic.co/guide/en/elasticsearch/client/net-api/6.x/writing-queries.html
It gives an example that this C# query with Fluent API
var searchResponse = client.Search<Project>(s => s
.Query(q => q
.MatchAll()
));
will translate into this json query:
{
"query": {
"match_all": {}
}
}
This is all good, but i want to see it for myself in the code. So now my question is - is it possible to get the JSON string in my C# code?
I need it because, i want to see how NEST translates the C# query into JSON when i make some more complicated queries such as big aggregations.
Then i can see how it looks in JSON, and see if it translated it into the JSON i expected.