Search has encountered a problem that prevents results from being returned

When writing search queries in C# code you sometimes get the following error.

“Search has encountered a problem that prevents results from being returned. If the issue persists, please contact your administrator.”

In most cases it indicates that your search schema is not correctly setup. You request certain functionality in your code but your ‘Search Properties’ are not correctly configured.

For example the following code returned the above error:

query.SortList.Add("PublishingdateOWSDATE", SortDirection.Descending);
query.ResultTypes = ResultType.RelevantResults;
ResultTableCollection queryResults = query.Execute();

The reason of the error was simple.
The search property “PublishingdateOWSDATE” was not configured for sorting.

To fix this: go to central Admin -> Manage service Applications -> Search Service Application -> Search Schema.
Find the property “PublishingdateOWSDATE”, click on it and enable sorting by selecting “Latent” or “Active” from the dropdownlist:

The result should like:

Do a new crawl of your content (incremental worked for me) and test you code again.

So when getting a “Search has encountered a problem …” , always check if your search properties configuration (sorting, include in search, property name, …) is in line with the used functionality in your code.


  1. sabari

    May 15, 2014

    I didn’t find the publishingdateowsdate in the Managed propertie..Need help

  2. W0ut

    May 19, 2014

    @ sabari Activate the publishing features on your site and start a full crawl.

  3. Richard

    December 29, 2014
  4. amanpuneet

    January 15, 2015

    i cannot find the publishingdateowsdate in the managed properties. i need your help.

    • W0ut

      May 27, 2015

      Sorry, your comment got lost in all the spam. Make sure your have an item that uses this property and then start a full crawl of your search.

Share Your Thoughts