NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Debug information
editDebug information
editEvery response from Elasticsearch.Net and NEST contains a DebugInformation
property
that provides a human readable description of what happened during the request for both successful and
failed requests
var response = client.Search<Project>(s => s .Query(q => q .MatchAll() ) ); response.DebugInformation.Should().Contain("Valid NEST response");
This can be useful in tracking down numerous problems and can also be useful when filing an issue on our github repository.
By default, the request and response bytes are not available within the debug information, but can be enabled globally on Connection Settings
var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); var settings = new ConnectionSettings(connectionPool) .DisableDirectStreaming(); var client = new ElasticClient(settings);
or on a per request basis