Sharepoint 2013 web search part result output filtered

Hi.

I have 4 content sources that crawl specific file shares on our network, they work great, but I have multiple subsites. I want to create a web part search for a subsite and only have it search specific directories within those content sources. or at least search the entire content source but only give me the results if the file is in  \\fileserver\share\folder\folder.

June 25th, 2015 4:11pm

You need to create search scopes to achieve it

https://support.office.com/en-za/article/Define-scopes-for-searches-65c26a72-f3d3-42ba-8027-1bf7260b6acf

https://technet.microsoft.com/en-us/library/ee792872%28v=office.14%29.aspx

To add or edit a scope rule at the service application level
  1. Verify that the user account that is performing this procedure is a service application administrator for the Search service application.

  2. In Central Administration, in the Application Management section, click Manage service applications.

  3. On the Manage Service Applications page, in the list of service applications, click Search Service Application.

  4. On the Search Administration page, in the Quick Launch, under Queries and Results, click Scopes. The View Scopes page appears.

  5. On the View Scopes page, in the list of scopes, point to the name of the scope that you want to edit, click the arrow that appears, and then click Edit Properties and Rules.

  6. To add a new rule, on the Scope Properties and Rules page, in the Rules section, click New Rule. The Add Scope Rule page appears. To edit an existing rule, on the Scope Properties and Rules page, in the Rules section, click the rule that you want to edit. The Edit Scope Rule page appears.

  7. In the Scope Rule Type section, select one of the following options:

    • Web Address. Select this option if you want the scope to include or exclude content from any resource in the search index that can be identified either by a URL (such as Web sites, file shares, and Microsoft Exchange Server public folders) or by a host name, domain name, or subdomain name.

    • Property Query. Select this option if you want the scope to include or exclude content that has a managed property with a particular value. For example, Author="John Doe".

    • Content Source. Select this option if you want the scope to include or exclude content that was crawled by using a particular content source.

    • All Content. Select this option if the rule should not restrict the scope (the scope will include or exclude all content in the index).

  8. In the Behavior section, select an option to specify how this rule combines with other rules to define the scope:

    • Include Any item that matches this rule will be included, unless the item is excluded by another rule. Use this option to apply an OR rule.

    • Require Every item in the scope must match this rule. Use this option to apply an AND rule.

    • Exclude Items matching this rule will be excluded from the scope. Use this option to apply an AND NOT rule.

    For example, if you apply include rules named I1 and I2, require rules named R1 and R2, and exclude rules named E1 and E2, the resulting scope equals the following:

    (I1 OR I2) AND R1 AND R2 AND (NOT E1) and (NOT E2)

  9. Click OK.

Free Windows Admin Tool Kit Click here and download it now
June 26th, 2015 12:42am

Hi,

In SharePoint 2013, you can configure Result Sources to limit the search results displayed in the search results web part.

For more details about Result Sources, please refer to the links below:

Understanding result sources for search in SharePoint Server 2013: https://technet.microsoft.com/en-us/library/dn186229.aspx

How to configure the Search Results Web Part to use a new result source in SharePoint 2013: http://blogs.technet.com/b/tothesharepoint/archive/2013/11/06/how-to-configure-the-search-results-web-part-to-use-a-new-result-source-in-sharepoint-2013.aspx

You also can filter the results with managed property contentsource, please refer to the steps in the link below:

Walkthrough on how to display Search Results filtered on a specific Content Source: http://blogs.msdn.com/b/bill_voss_blog/archive/2013/04/16/how-to-get-search-results-for-a-specific-content-source.aspx

Best regards,

Victoria

June 29th, 2015 3:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics