HOW TO: Implement a custom iFilter in SharePoint 2013

This post is a contribution from Kevin Jacob Kurian, an engineer with the SharePoint Developer Support team.

In SharePoint 2010, we had an option of implementing custom iFilter for files (like PDFs) so that we can see the search results from these files as well.  SharePoint 2013 has this feature of crawling PDF files in-built.  So, the need for developing a custom iFilter is rare but still if you want to develop one (say for a DWG file) in SharePoint 2013, then the following steps will help.

1. We need to perform an additional step apart from following the article that talks about registering a custom iFilter for SharePoint 2010.

2. We need to run the New-SPEnterpriseSearchFileFormat cmdlet after we complete all the steps outlined in the above article.

3. The New-SPEnterpriseSearchFileFormat cmdlet adds the new file format and a corresponding file name extension to the search parsing system.  This binds the file format to a filter-based format handler in the search parsing system.  Thus, the search parsing system can only parse the new file format if the user has installed a corresponding filter-based handler, an iFilter, for the new file format.

Here’s a sample to register an iFilter for DWG files.

$ssa = Get-SPEnterpriseSearchServiceApplication “Enterprise Search”

New-SPEnterpriseSearchFileFormat –SearchApplication $ssa –FormatId dwg –FormatName DWGFiles –MimeType application/dwg

After registering the file format, restart the search service.

Hope this was helpful!