Full-text indexing in SharePoint with the Text IFilter

There is a lot of information out there about indexing PDF files in SharePoint, but not much on indexing other files that are really just text files, but don’t have an IFilter associated with them by default.

I found one great blog post at Adventures in SPWonderland that goes through the entire process of adding your source code indexed by SharePoint, but so I have it handy, I’m rehashing the part I really care about which is just getting the file extension recognized in SharePoint and assigning the text parser IFilter tquery.dll assigned to the new extension for full-text queries.

Adding the extension to the File Types

  1. Open your Shared Services Administration and under the Search section, click on Search Settings
  2. Click on File Types

    FileTypes

  3. Click New File Type
  4. Type the extension you are adding, if you are adding *.cs files, you would type cs
    (Note:  Do not include the period in front of the name extension)
  5. Click OK

Assigning the text IFilter to your extension

This next step is done to tell the SharePoint Server service which IFilter to use when it is indexing your new file type.

  1. Open the registry editor (Start –> Run –> Regedit.msc)
  2. Navigate to the key below:
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server12.0SearchSetupContentIndexCommonFiltersExtension
  3. Add a new key with the name of your extension, continuing with the .cs we used above, we will add a new key called .cs
  4. Change the default value to be {4A3DD7AB-0A6B-43B0-8A90-0D8B0CC36AAB}. 

registry setting

Finishing up

  1. Start and stop your Office SharePoint Server Search service, either through your services snap-in or by running the two commands below
    net stop osearch
    net start osearch
  2. Now to update your index by performing a full crawl on any content sources that contain the types of files you just added this new capability to.
Facebooktwittergoogle_plusredditpinterestlinkedinmailFacebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Leave a Reply

Your email address will not be published. Required fields are marked *