2

I have 7 site collections and would like to return search results from all of them. That currently only works for the first site collection I created while setting up the farm. Whenever I search from site collections 2-7, I only have results returned from the local site collection. Of course if I specify the results page URL in site collection settings, I will be redirected to my search site and get the results I want.

So, I want these results to be returned in the osssearchresults.aspx of the local site collection instead of being redirected to the results.aspx page in my search site.

Thanks in advance.

3 Answers 3

1

The search in the osssearchresults.aspx happens by passing the parameters via URL. If you check the search URL of a site2 after clicking on the Search button, the url is like as follows:

http://<Server>/sites/site2/_layouts/15/osssearchresults.aspx?u=</sites/site2>&k=<Searchword>

Now u=</sites/site2> is getting changed in every site collections. If you remove the u=</sites/site2> from the URL, then the sarch will happen in all site collections. The search URL will be.

http://<Server>/sites/site2/_layouts/15/osssearchresults.aspx?k=<Searchword>

So this the solution. So to skip the passing of u=</sites/site2> in site2, Please follow the following steps:

  1. Go to site2 and go to Site Settings page
  2. Click 'Search Settings' under 'Site Collection Administration'
  3. Uncheck 'Use the same results page settings as my parent.'
  4. Put /sites/site2/_layouts/15/osssearchresults.aspx in the 'Results page URL:'
  5. Click OK
  6. Check the Search Result. enter image description here You need follow the above steps in 2-7 site collections. You do the above settings using powershell as well.
1
  • Is there a possibility to search multiple sites but not all of them? Something like u=site1&site2
    – greenhoorn
    Sep 7, 2017 at 14:27
1

Rather than send your uses to the useless OSSSearch Page, why not just configure the Site Collection to send them to your search center. This way you will get results from all sites?

Alternatively you can teach them what to expect when searching a list (just list content) a site (just site content) and "everything" all site collections.

0

In the search settings for the site collection you need to choose "Enable custom scopes (such as "All Sites") by connecting this site collection with the following Search". Seems you selected "Do not use custom scopes. Use only contextual scopes (such as "This Site"). Display results in the Site" and hence the contextual results.

1
  • Sorry, I did not mention this earlier. I am using SP13, so I am dealing with result sources. The default result source is the Local SharePoint Results. Currently under site collection search settings, I only have the option to "enter a search url", and "which search results page should queries be sent to?". What you describe sounds like what I need to change, but is that in SP13?
    – Jon Smith
    Jul 11, 2014 at 14:03

Your Answer

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

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