I am working on a sharepoint on-premises farm 2013, and i am using Search Result web-part to return all the sub-sites which are under a parent site collection, so i define the following criteria, inside the Search Results web part:-


enter image description here

The search criteria should mainly return all the sub-sites which contain the parent site collection path http://******/businessfunctions/ inside its path. now as shown in the above picture the Search Result web part only return 4 sub-sites, while the site collection contain 9 sub-sites, as follow:- enter image description here now i test this on another farm which contain around 40 sub-sites and the Search Result was able to retrieve only 9 sub-sites.. now currently i am running the web part using the system account username, so i can view,edit every thing, so the problem i am facing is not a permission issue . so what could be causing this problem? so the Search Result web-part does not show all the intended sites?

Edit. now under the web-part setting there is an option to show duplicates, and when i set the web-part to show duplicates i got all the related sub-sites.. so not sure why the web-part is assuming that the sub-sites are duplicates, although each sub-site has its own URL and title.. but those sub-sites where created using a custom site template !! So could this be the issue, that the web-part is dealing with all the sub-sites which have been created using a custom site template as duplicates ?? seems weird??

1 Answer 1


Just as you stated in your edited question, there seem to be some issue as SharePoints misstaken sites using the same custom template as duplicates and hides them from your querys result.

The author of this blog post had the same problem as you did and mention that the solution is/were to modify the TrimDuplicates property.

SharePoint Online Search Results Duplicates "Trap"

  1. Export the Search Results Web Part from your page.
  2. Open the .webpart file in your favorite editor.
  3. Search for “Trim Duplicates”, you will find it as part of the DataProviderJSON property.
  4. Set the "TrimDuplicates" property to False.
  5. Upload the web part.
  6. Add the web part to your page.

Search is not returning all STS_Web

If you would like to dig deeper, I think that you could use PowerShell to get the properties from either the sites created using the custom template, or the template itself and see if you find any duplicate ID's or something like that.

  • now at this stage i am more worried about my sub-sites which have been created using the custom site template, if they are corrupted or have problems inside them!!! so which properties i need to check using powershell? now i think the sub-site id will/should be unique, becuase other wise i will be getting errors ? is this correct ? and if i find that there are duplicate properties , should i fix them or i can leave the situation as is ?? i am totally confused/worried at this stage !!
    – John John
    Aug 16, 2017 at 11:31
  • 1
    No, i think they are totally fine. This looks more like a problem related to the design of the search web part. I'm unsure what SharePoint actually consider a duplicate when it comes to sites created a custom template so i'm afraid you have to do some digging yourself or contact Microsoft. On the other hand, there might be a patch/CU related to this problem as it seems like it's an old one. Aug 16, 2017 at 12:32
  • also i try using the content search web-part instead of search result web-part, and seems i will get all the intended sub-sites.. even inside the content search web-part there is not any option to remove/keep duplicates... while inside the search result web-part this option exists .. i am thinking of opening a ticket on MSDN to see what is going on and then will updated the question if i get any answer..
    – John John
    Aug 16, 2017 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.