I’m doing some work on SharePoint search recently. while the tool is fairly impressive, it comes with its own pitfalls, one of them I will discuss now: from a certain content scope, you want to return only documents, the scope contains content crawled from a web site file share, external to SharePoint. this is somewhat less common and most examples do not refer to it which may be the cause to this peculiarity. now searching the web on how to go along with this requirement will result with several suggestions :
1. add a scope property rule : IsDocument = 1 – not working, no results are returned from any query (not to try on production)
2. add your query with different variations of : (“IsDocument” = 1) – gives an array of weird results and COM exceptions
3. add your query with : freetext(DEFAULTPROPERTIES,’IsDocument:1’) – this is actually documented to be unsupported and while it did gave promising results, further tests proved it to be inaccurate and insufficient.
so after much fiddling with scope rules I came up with the following solution, since folders do not have contenttype I created a scope rule like so: [contenttype = ] , yes blank. it works for me, hope it will work for you too.