Implement a custom iFilter in Sharepoint 2013

Today I’d faced a trivial problem but finally easy to solve, the problem was the following:

A customer uploads in a SharePoint document library several images files as jpg, png, etc… but he was complaining about that files in the document library were not indexed.

First I took a view to the search logs and apparently all was correctly, then I pointed the root cause to index file types in Search Service App, and boom, jpg files and png files were not included in Search.

After I included these two files types, all the items were indexed, but I realized that png files were not indexed at all, and these kind of files were launching in the search the following error:

275285

So… what we can do? We already added the file type to Search, so next step? Easy answer… Powershell!!

Is rare to develop a custom iFilter, but the next step will help to make this:

We need to run the New-SPEnterpriseSearchFileFormat cmdlet, this adds a new file format and a corresponding file name extension to the search parsing system, so, let’s powershelling

$ssa = Get-SPEnterpriseSearchServiceApplication “Enterprise Search App”

New-SPEnterpriseSearchFileFormat –SearchApplication $ssa –FormatId png –FormatName PNGFiles –MimeType application/png

After registering the file format, restart the search service and launch a full crawl

Hope it helps!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s