locked
limit site recursion in result source RRS feed

  • Question

  • I am trying to limit a result source in sharepoint 2013 from returning all subsites with a path.

    my query is 

    {searchTerms}contentclass:STS_Web path:http://site.domain.com/level1

    I would only want is to return sites one level lower.

    ie http://site.domain.com/level1/level2_1 http://site.domain.com/level1/level2_2

    I do not want it to return subsites within the level2 sites. Is there anything I can add to my query to limit the subsite recursion? thanks

    Wednesday, August 13, 2014 5:16 PM

Answers

  • Hi Robert,

    According to your description, my understanding is that you don’t want to return all subsites in a site when using Search.

    As a workaround, you can create a crawl rule for each subsite(like http://site.domain.com/level1/level2_2/subsite1) in the site, and select Exclude all items in this path in the crawl rule. Then when crawling the content source, it will exclude all items in these path, and items will not be returned when you search using your result source.

    More information about crawl rules, please refer to the link:

    http://technet.microsoft.com/en-us/library/jj219686(v=office.15).aspx

    I hope this helps.

    Thanks,

    Wendy

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wendy Li
    TechNet Community Support


    Thursday, August 14, 2014 7:39 AM
  • when using search i do want the subsites to be searchable, I only want to limit results in a result source. We have a third party webpart that uses result source as an input and I want to exclude the subsites from the result source that the webpart uses.

    I guess I could apply the same logic to the result source query. I will give it a try and report back. thanks

    • Marked as answer by Lindali Sunday, August 24, 2014 7:33 AM
    Thursday, August 14, 2014 5:33 PM

All replies

  • Hi Robert,

    According to your description, my understanding is that you don’t want to return all subsites in a site when using Search.

    As a workaround, you can create a crawl rule for each subsite(like http://site.domain.com/level1/level2_2/subsite1) in the site, and select Exclude all items in this path in the crawl rule. Then when crawling the content source, it will exclude all items in these path, and items will not be returned when you search using your result source.

    More information about crawl rules, please refer to the link:

    http://technet.microsoft.com/en-us/library/jj219686(v=office.15).aspx

    I hope this helps.

    Thanks,

    Wendy

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wendy Li
    TechNet Community Support


    Thursday, August 14, 2014 7:39 AM
  • when using search i do want the subsites to be searchable, I only want to limit results in a result source. We have a third party webpart that uses result source as an input and I want to exclude the subsites from the result source that the webpart uses.

    I guess I could apply the same logic to the result source query. I will give it a try and report back. thanks

    • Marked as answer by Lindali Sunday, August 24, 2014 7:33 AM
    Thursday, August 14, 2014 5:33 PM
  • Hi Robert,

    Do you have any update?

    Best Regards,

    Wendy

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wendy Li
    TechNet Community Support

    Friday, August 22, 2014 2:45 AM