We are using SharePoint 2013 On Premises and SharePoint Online (Office 365). We are using the Cloud Search Service to provide Hybrid Search functionality.
We have added SharePoint online as a result source ('HybridResults') in the On Premise Search Service Application
We are observing the following behavior:
when adding a Content Search Webpart (CSWP) on a page in SharePoint Online and specifying the following query we are receiving all expected results:
contentclass:STS_Web path:https://ourtenant.sharepoint.com/sites/departments
when adding a CSWP on a page in SharePoint Premise and selecting the 'HybridResults' resultsource and specifying the exact same query we are receiving just 1 resultitem.
I've exported the CSWP and changed TrimDuplicates to False under DataProviderJSON
What more can I do to receive all results?
Update:
I've also tried the following queries using the API, which suggest the issue is related to TrimDuplicates:
/_api/search/query?querytext='b-nl'&querytemplate='path:https://ourtenant.sharepoint.com/sites/departments contentclass:sts_web'
contains 1 result:
<d:TotalRows m:type="Edm.Int32">1</d:TotalRows> <d:TotalRowsIncludingDuplicates m:type="Edm.Int32">223</d:TotalRowsIncludingDuplicates>
/_api/search/query?querytext='b-nl'&querytemplate='path:https://ourtenant.sharepoint.com/sites/departments contentclass:sts_web'&trimduplicates=false
contains all results:
<d:TotalRows m:type="Edm.Int32">223</d:TotalRows> <d:TotalRowsIncludingDuplicates m:type="Edm.Int32">223</d:TotalRowsIncludingDuplicates>