POC - Part 2a: Ignoring Indexed Folders

In Part 2 of this series we crawled a file system and indexed that content. In doing so we also discovered that the SharePoint crawler also submits the folders of the file system to the index and Fast gladly add them. This submission of folders means that the search results can appear crowded since folders don't covey much in a standard search result.

There are a number of ways to make the folders disappear.

In a standard search result using my sample corpus:

I specifically clicked on Site --> \\vboxsvr to narrow the results to just my content and the first 55 results are folders. Bleech.

There are a number of ways to fix this:

  1. Write a query to tell the system to ignore folders
  2. Configure the Search Core Results web part to tells the system to ignore folders
  3. Write a custom web part to submit a query to tell the system to ignore folders

I sense a pattern. No matter how you try to do this it will always end with sending a query to Fast telling the system to ignore the folders. Freaky.

Let's fix the obnoxious folder behavior.

  1. The first way is rather primitive and does not sit well with the average user of search. It involves understanding query syntax and Boolean logic and perhaps even advanced arithmetic. We have already used this in the last post.

    In order to have the search results return only documents you add isDocument=true. The word AND is capitalized so the query uses it as an operator and not as part of the keyword.

  1. The second way involves editing the Search Core Results web part.
    1. In the Fast Search Center select Site Actions --> Edit Page.

    2. Scroll down to the Search Core Results web part and select Edit Web Part.

    3. Scroll back to the top and upper right hand corner of the page to find the configuration for this web part.

    4. Open Results Query Options and enter in the Append Text To Query field: isDocument=true.

    5. Click OK.

    6. Click Save and Close on the page.

    7. Rerun the query and see just documents returned! Good times!

  2. Write a custom web part: not happening here. Maybe in another post.

Thanks for Leo Souza for doing the legwork on this one.