Why the SharePoint 2013 search results web part is not showing all results

Why the SharePoint 2013 search results web part is not showing all results

I added the search results webart to my teamsite in order to create a dynamic list with all subsites. But the strange thing I noticed was that when building the query the search results preview was showing all subsites, and after i added the webpart to my site it didn’t anymore. It only showed a couple.

The reason this happens is because SharePoint 2013 search is trimming the search results. In this case it finds a couple of results that are quite similar and by default duplicates are filtered out of the result set.

You can view duplicates but you’d have to hover over a search result that in fact has a duplicate.

In the next screenshots i will explain what happened and how i fixed it.

Search results query webpart with preview

Webpart showing only two results instead of four

The fix

We need to change the TrimDuplicates parameter and set it to false. Unfortunately it is not a setting in the Edit Web Part properties pane. So we will have to download the web part and change the parameter using an editor.

Edit the web part

Find TrimDuplicates and change it’s value from true to false.

Search Results.webpart

Save the file and rename it if you like.

Upload the edited web part

Add the web part to the site

After you’ve uploaded the new web part it’ll show up in the list under Imported Web Parts

Fixed it!