Skip to main content

Cloud

SP2013 Search Quickie – Query Rule By Folder

Quick and dirty, without any manipulation of managed properties. This can be handy for file share crawling where SharePoint will index the physical folders of the file share.

To get to your query rules, go to Site Settings –> Query Rules (Under Search).

Configure a rule for Local SharePoint Results:

2012-12-13_1114

Click “New Query Rule”:

– Create a Name for the rule, Folders seems sufficient

– Set Query Conditions to “Query Contains Action Term” –> Action Terms being “Folder; Folders” (semi-colon delimited)

2012-12-13_1115

 

Click “Add Result Block” and on the next screen “Launch Query Builder”:

Set Select a query to the “Query’s original source”

– Keyword filter to {subjectTerms} –> Add that to the Query text

– Property Filter: Select IsContainer from the managed properties, set the Manual value to true –> Add that property filter

From here you can test your query to make sure that it returns what you’re looking for. In this case, folders.

2012-12-13_1116

 

Save your work, and folders should now show up as a promoted result block for your users!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.