SharePoint provides the excellent capability of discovering content, discussions, people, etc from your SharePoint environment, which leverages the Search service. Though this is a pretty useful feature, there are a few limitations that sometimes need to be handled in order to meet the requirements and desired results/output.
Maximum search results returned limitationSharePoint 2010 search has a default limit of 10000 maximum results for the submitted queries.
This is something the developer might not be aware of initially but will encounter an exception if tried to get results more than 10000 results using the RowLimit of FullTextSqlQuery.
If RowLimit is not specified, only 50 results will be returned by default.
See the below line from the developer code.
query.RowLimit = 15000;
ResultTableCollection queryResults = query.Execute();
In this code, the developer wants to get 15000 results for the provided query, but the code throws an exception as Exception from HRESULT: 0x80040E01.
This is because the default limit set by SharePoint is 10000, moreover this cannot be changed through Central Administration. One way to change this setting is by using the below PowerShell command.
$ssa = Get-SPEnterpriseSearchServiceApplication
$ssa.UpdateSetting("Config:qp_MaxResultsReturned", 15000)
$ssa.Update()
Now if the above code is executed, the query will return a maximum of 15000 results. The limit can be set to 10000 again using the same PowerShell script as above and changing Config:qp_MaxResultsReturned to 10000.
Important NoteThis PowerShell script will modify the related Search Service Application configuration for the entire FARM, so please consult your SharePoint Admin before making any updates. This is not recommended in live Production environments and such changes should be made only by the Admins.
Have Questions? Post them here!
- Move Copy Migrate SharePoint OneDrive files folders to different site collection location
- How to generate client id and secret to register SharePoint App with OAuth
- How to share SharePoint site or document with all users in organization
- Get-ADUser PowerShell - Get AD user details using email address
- error CAML Query containing special characters
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- How to delete SharePoint List Item programmatically using C#.Net
- How to Share Microsoft SharePoint Site with Users or Groups
- JSON column formatting to preview SharePoint Online file on mouse hover
- SharePoint List redirect user after submitting form NewForm.aspx
- See actual SharePoint error exception modify web.config
- SharePoint Server 2016 IT Preview Deprecated Removed features
- How to create SharePoint Document Library
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- How to disable SharePoint subsite creation option for owners
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint)
- SharePoint error - Your organization doesn't allow sharing with users from this domain. Please contact your IT department for help. (OSE403)
- [Solved] SharePoint Search Internal server error exception
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- Changed AD user display name showing old name in SharePoint
- How to hide or remove quick launch left navigation from SharePoint Online Modern site page
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- Facebook, Messenger, and Instagram down in many regions - UK, Europe, Australia - Facebook
- How to find lost AirPods? - HowTos
- Eclipse : Workspace was written with an older version of the product and will be updated - Eclipse
- 3 Commands to stop Nginx Server - Linux
- Add Line Break in Microsoft Excel Cell on Mac (macOS) - MacOS
- [fix] psycopg2 Error: pg_config executable not found - Python
- Eclipse : This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in - Eclipse
- Error: Unable to access jarfile jarFileName.jar file [Windows] - Java