SharePoint Online Provider Hosted - No Search Results

Copper Contributor

Hi I'm having trouble with my provider hosted app.

I've created an app which mostly works, but the search whilst I could have sworn was working now gives me no results.

 

My code is thus.

KeywordQuery keywordQuery = new KeywordQuery(_sp);
 keywordQuery.QueryText = "Test*"
                     
 keywordQuery.StartRow = 0;
                      
SearchExecutor searchExecutor = new SearchExecutor(_sp);

ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);
 _sp.ExecuteQuery();

 and it all works and compiles, but no results. The site works fine, if I try the REST API though a test tool and Postman, that works fine. But this does not.

Any ideas on how to fix this?

0 Replies