Update 11/03/08: Fellow MVP Mike Walsh correctly points out that this is a WSS 3.0 / MOSS feature. It does not work in WSS 2.0 or earlier.
Updatte 11/03/08: (Second update in one day!): Be sure to read the excellent comment from "nowise" for more info and another good xref link.
Two questions came up in rapid succession this week on the MSDN forums asking a variation of this:
"When I search a keyword, folders from my document library with that keyword in their path will come out first in my search results. I don’t want that to happen. Files with that keyword are more important to me. I don’t want to see folders at all."
This is actually quite easy to do out of the box. Simply add a "IsDocument:1" to the search query and SharePoint search (both WSS and MOSS) will restrict itself to showing actual documents.
Subscribe to my blog.
Follow me on Twitter at http://www.twitter.com/pagalvin