I am on updating to the latest Nest
version. Since I am getting not the expected results I am searching for replacement of the EnableTrace()
method
EnableTrace()
will be back, but it's not available yet(have a look).
For now you can use this code to print out information about request and response:
var settings = new ConnectionSettings(connectionPool)
.DefaultIndex(indexName)
.DisableDirectStreaming()
.OnRequestCompleted(details =>
{
Debug.WriteLine("### ES REQEUST ###");
if(details.RequestBodyInBytes != null) Debug.WriteLine(Encoding.UTF8.GetString(details.RequestBodyInBytes));
Debug.WriteLine("### ES RESPONSE ###");
if (details.ResponseBodyInBytes != null) Debug.WriteLine(Encoding.UTF8.GetString(details.ResponseBodyInBytes));
})
.PrettyJson();
Make sure you have set .DisableDirectStreaming()
on ConnectionSettings
.
Hope it helps.