Is it possible to get the raw search query from the NEST client?
var result = client.Search(s => s
on nest version 6 use
connextionString.DisableDirectStreaming();
then on response.DebugInformation you can see all information.
The methods to do this seem to change with each major version, hence the confusing number of answers. If you want this to work in NEST 6.x, AND you want to see the deserialized request BEFORE it's actually sent, it's fairly easy:
var json = elasticClient.RequestResponseSerializer.SerializeToString(request);
If you're debugging in Visual Studio, it's handy to put a breakpoint right after this line, and when you hit it, hover over the json
variable above and hit the magnifying glass thingy. You'll get a nice formatted view of the JSON.