public static class DebugES<T> where T : class
{
public static string GetDebugInformation(SearchDescriptor<T> searchDescriptor)
{
IConnectionPool pool = new SingleNodeConnectionPool(new Uri("url"));
var settings = new ConnectionSettings(pool).EnableDebugMode();
settings.DefaultIndex("IndexName");
var client = new ElasticClient(settings);
var response = client.Search<UserInfoIndex>(searchDescriptor);
var debugInformation = response.DebugInformation;
return debugInformation;
}
}