26 June, 2007

Searching Document and Image libraries with MOSS

A client of mine wanted to use the MOSS search only to return hits from document and images libraries. My first idea was to use Crawl Rules for this. Worked pretty good but every time I tried to put an exlude rule for everything else at the bottom, that emptied my index. Besides, if we at a later date want to use the search from something else to, we wouldn’t get a lot of hits.

Change of strategy. I started looking at scopes and how the out-of-the-box scopes look. They use the contentclass property to match against users for example:

contentclass = urn:content-class:SPSPeople

So I started messing around with this and found this blog post Jose Barreto. So I solved the problem by creating a new scope and sat the following include rules on it: