I'm finding that my SharePoint 2010 search results are showing results for both a folder and that folders default.aspx page. For example, my results can look like this:

<description taken from default.aspx page>

Product One - Information
<description taken from default.aspx page>

Ideally I want to remove/exclude the results for the folders, leaving just the default.aspx pages in the results.

Can anyone help me out with a crawl rule to produce the desired results? Either a 'standard' *://*... style rule or a regular expression?

  • Have you tried to reindex the crawl database? Commented Nov 11, 2011 at 2:54
  • Yes. Can you expand on why this might help? I mean, as folder not meant to show in results, or is there some other reason I might not be aware of?
    – QMKevin
    Commented Nov 11, 2011 at 13:28
  • Kevin, can you tell me exactly where you put that code?
    – user9134
    Commented Jun 28, 2012 at 12:22

1 Answer 1


You can limit the search returns with the query you use, and not have to change the crawl rule.

For example, If you are searching for "Product", you can enter the following into the search query box:

Product IsDocument:1

and you should only get documents and not folders.

You can configure the query web part to automatically append IsDocument:1 to all searches, so users don't need to enter it on all searches.


You enter the extra query terms in the Search Box Web Part. See screenshot. Search Box Extra Query Terms

  • I should have mentioned that this is a publishing site, used by customers and prospective customers. We can't expect them to know to use IsDocument:1 So, back to excluding them by default - crawl rules being the best way. Any ideas?
    – QMKevin
    Commented Nov 11, 2011 at 13:26
  • you can automatically and silently append (behind the scenes) extra query terms without users knowing about them. You could add IsDocument:1 and there is probably a flag to say "is not a folder" too.
    – lwbecker2
    Commented Nov 11, 2011 at 13:39
  • Sorry, I just spotted that you essentially said that in your original answer (I should have my first cup of Tea BEFORE replying to posts <g>). My search results page is a copy of 'osssearchresults.aspx', so I assume the web configurations would be done on <SearchWC:CoreResultsWebPart runat="server" ShowActionLinks=false ChromeType="None"/>? I'll check around to see what I can find, unless you happen to know what I need to add and where?
    – QMKevin
    Commented Nov 11, 2011 at 14:33
  • I found it :) I updated my ASPX webpart element to be: <SearchWC:CoreResultsWebPart runat="server" ShowActionLinks=false ChromeType="None" AppendedQuery="IsDocument:1"/> and now I get documents only. Plus I found the MS page that lists all the properties, so I have so fun times ahead trying them out :) Many thanks for the help.
    – QMKevin
    Commented Nov 11, 2011 at 14:53
  • Thanks for the updated answer, with screenshot. I'm sure that will help others. In my case I was working with an custom application page in the /_layouts/ folder (a copy of osssearchresults.aspx), so could only edit the .aspx page directly. However, my comment above achieved the same goal as your UI based update.
    – QMKevin
    Commented Nov 11, 2011 at 16:47

Your Answer

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

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