public bool IndexExists(IndexExistsCommand indexExistsCommand) { try { connection.Head(indexExistsCommand); return(true); } catch (OperationException ex) { if (ex.HttpStatusCode == 404) { return(false); } throw; } }