none
Search Centre in a HNSC environment RRS feed

  • Question

  • Hi all,

    I'm running SP2013 and using host named site collections architecture. At the moment my enterprise search centre is actually the landing site of our intranet at http://intranet.company.com. Each department is its own site collection, using host header managed path e.g. http://intranet.company.com/sites/it, /sites/hr etc.

    We also have other site collections such as http://projects.company.com, http://tenant1.company.com.

    I know if I do a search within the site collection of a given host header, e.g. searching within Intranet, results from IT and HR would return, and like wise searching within Projects I get everything under Projects whether it's a sub site or a site collections using host header managed path. 

    My question is is there a way to have results returned from multiple site collections with different host header using one search centre? I'd like Intranet search to be able to also return results from the Projects site collection, or is this not possible?

    My situation is similar to the poster here: http://sharepoint.stackexchange.com/questions/83310/location-for-search-center-in-a-sharepoint-2013-implementation

    According to Matthew's response, all I have to do is "in each Site Collection configure the search settings to use the "global search center"". So I point the Projects site collection to use the Intranet search centre, uploaded a test file in the project site, did a incremental crawl, checked that the Projects site search picks up the test file, went to the Intranet search centre and did the same search but nothing came back. Am I missing something?

    Thank you.

    • Edited by Hyde1031 Friday, July 31, 2015 2:01 AM
    Friday, July 31, 2015 1:25 AM

Answers

  • I found a solution that works for me. You need to utilise Result Source and create a new Search Vertical.

    Make sure the new Result Source is of the type "Remote SharePoint Site", and provide the HNSC URL you want to search for. It has to be HTTPS, and of course a certificate for the HNSC. In the query, set the Path to HNSC, don't worry if it doesn't return any results in the test section. Just ok and use it in your search result web part.

    You can google "How to add a custom search vertical to your search results page in SharePoint 2013" for steps on setting up a Search Vertical.

    Friday, August 7, 2015 2:23 AM

All replies

  • Hi Hyde,

    How about doing a full crawl?

    You can do a full crawl, then test whether it works.


    Thanks,
    Jason
    Please remember to mark the reply as answer if it help, and unmark the answer if it provide no help.

    Friday, July 31, 2015 3:02 AM
  • Hi Jason, thanks for your reply.

    The test file in project site was crawled and shows in the search results when doing a search within the project site.

    It's more of a question of how I can get results from two site collections with different host headers (intranet.company.com and projects.company.com) to return results to one single search centre (currently sitting at intranet.company.com)? And if the location of my search center is the issue, then where should I create it? 

    My observation is that under which ever host header you create the search centre, at most it will only return results of everything under that host head, be it a sub site, or a site collection using managed path - e.g. intranet.company.com/sites/IT, but not any site collections under a different host header - e.g. projects.company.com. Is this where search draws the line? at the host header level?

    I would imagine HNSC is a common setup, so how do people go about searching more than one HNSC from 1 search centre?? Unless this is just the way it is? If so, that's fine, but please confirm thank you.

    Thanks in advance.

    Friday, July 31, 2015 4:28 AM
  • Hi,

    Per my knowledge, when we place the URL of the web application within the desired content source.

    The crawler is able to detect and crawl any host header site collections defined in the web application.

    You can place your top site collection URL, such as http://top.company.com in the content source, then make a full crawl, all the HNSC’s would be crawled.

    Then you will get all the results from different host header site collections.

    More reference:

    http://blogs.msdn.com/b/russmax/archive/2013/10/31/guide-to-sharepoint-2013-host-name-site-collections.aspx

    https://social.technet.microsoft.com/Forums/office/en-US/9449dfc7-ae0f-4bb4-b6ca-64f64c5e676e/indexing-hnscs-with-sp2013-enterprise-search?forum=sharepointadmin


    Thanks,
    Jason
    Please remember to mark the reply as answer if it help, and unmark the answer if it provide no help.

    Friday, July 31, 2015 6:23 AM
  • Thanks Jason, my current setup does reflect the suggestion you've provided.

    I do have the top site collection (root HNSC, same URL as the web app) in my content source, and it is the only one there, and as you said it covers all the HNSCs. I recently did a full crawl and all HNSC have been crawled. And search works individually on each site collection - siteA.domain.com shows results from siteA.domain.com, and siteB.domain.com shows results from siteB.domain.com, but I'm wondering if there is a way/setup that would allow me to show results from both siteA and siteB in one search. 

    For example, I have a document called DocB in siteB.domain.com and DocA in siteA.domain.com. They BOTH contain the word "Test". I want to be able to do a search on the word "Test" and have both DocA and DocB show up in the same search result page.

    Appreciate your help.


    • Edited by Hyde1031 Friday, July 31, 2015 6:47 AM
    Friday, July 31, 2015 6:46 AM
  • I found a solution that works for me. You need to utilise Result Source and create a new Search Vertical.

    Make sure the new Result Source is of the type "Remote SharePoint Site", and provide the HNSC URL you want to search for. It has to be HTTPS, and of course a certificate for the HNSC. In the query, set the Path to HNSC, don't worry if it doesn't return any results in the test section. Just ok and use it in your search result web part.

    You can google "How to add a custom search vertical to your search results page in SharePoint 2013" for steps on setting up a Search Vertical.

    Friday, August 7, 2015 2:23 AM
  • It would be great help if you can give a detailed step on this. I want to crawl an HNSC separately and show its result in a separate result page and not in the general results

    Shashank

    Wednesday, October 2, 2019 6:07 AM