use of searchExecutor

I’m trying to use the search for sharepoint 2013 so I use searchExecutor. My issue is when I execute this line, I get an exception

ResultTableCollection searchResults = searchExecutor.ExecuteQuery(kquery); 

Here is the complete example

// get the query and settings service proxy                 SearchQueryAndSiteSettingsServiceProxy settingsProxy = SPFarm.Local.ServiceProxies.GetValue<SearchQueryAndSiteSettingsServiceProxy>();                 // get the search service application proxy by name                 SearchServiceApplicationProxy searchProxy = settingsProxy.ApplicationProxies.GetValue<SearchServiceApplicationProxy>("Search Service Application");                  KeywordQuery kquery = new KeywordQuery(searchProxy);                 kquery.IgnoreAllNoiseQuery = false;                 kquery.ResultsProvider = SearchProvider.Default;                 kquery.RowsPerPage = Convert.ToInt32(itemPerPage);                 kquery.RowLimit = Convert.ToInt32(itemPerPage);                 kquery.StartRow = (currentPage * Convert.ToInt32(itemPerPage)) + 1;                 string[] cols = queryCol.Split(';');                 foreach (string c in cols)                 {                     kquery.SelectProperties.Add(c);                 }                 kquery.QueryText = strKey.Trim();                 int ce = kquery.SortList.Count;                 switch (dir.ToLower())                 {                     case "ascending":                         kquery.SortList.Add(colSort, Microsoft.Office.Server.Search.Query.SortDirection.Ascending);                         break;                     case "descending":                         kquery.SortList.Add(colSort, Microsoft.Office.Server.Search.Query.SortDirection.Descending);                         break;                 }                 //kquery.ResultTypes |= ResultType.RelevantResults;                 //ResultTableCollection searchResults = kquery.Execute();                 //ResultTable queryResultsTable = searchResults[ResultType.RelevantResults];                 SearchExecutor searchExecutor = new SearchExecutor();                 Utils.writeDBLog("", "searchExecutor","" );                 ResultTableCollection searchResults = searchExecutor.ExecuteQuery(kquery);                 Utils.writeDBLog("", "searchResults", "");                 var queryResultsTables = searchResults.Filter("TableType", KnownTableTypes.RelevantResults);                 Utils.writeDBLog("", "queryResultsTables", "");                 var resultTable = queryResultsTables.FirstOrDefault();                 Utils.writeDBLog("", "resultTable", "");                  DataTable dtTemp = resultTable.Table;                  //DataTable dtTemp = new DataTable();                 //dtTemp.Load(queryResultsTable, LoadOption.OverwriteChanges);                 sourceDataTable = CompleteDatatable(dtTemp);                 //nbResult = queryResultsTable.TotalRows;                 nbResult = resultTable.TotalRows;                 Utils.writeDBLog("", "nbResult", "nbResult: " + nbResult); 

In SharePoint 2010, I used the line in comment and it worked correctly but in 2013 it’s obsolete so I want to use searchExecutor.

For information I get this in my catch block

La recherche a rencontré un problème qui empêche de renvoyer les résultats. Si le problème persiste, contactez votre administrateur. – at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.ThrowGenericQueryException(String operationName) at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoSpLoadBalancedUriWsOp[T](WebServiceBackedOperation1 webServiceCall, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, String operationName) at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoWebServiceBackedOperation[T](String operationName, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, WebServiceBackedOperation1 webServiceCall) at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.Execute(QueryProperties properties) at Microsoft.Office.Server.Search.Query.Query.ExecuteQuery() at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueryInternal(Query query) at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQuery(Query query) at SearchResultSP.SearchResultWP.SearchResultWP.GetData()

I’m disapointed and I don’t understand why it doesn’t work

Thanks for your help