Matthew McDermott

Matthew is a principal consultant for Catapult Systems. A Microsoft MVP (SharePoint Server), Matthew blogs about SharePoint and Microsoft technologies related to collaboration, web content management and productivity.
RSS Feed

SharePoint Image Search (Part 2)

Introduction

This is Part 2 of a 4 part series on how to create an image search center on a MOSS site. My goal is to create a search results page similar to the Microsoft Live Search Images page. In Part 1 I explored the out of the box search experience for images and walked through the setup required to get the indexer to crawl image file types. We concluded the post with an issue: images stored in document libraries are not indexed the same as images stored in Picture libraries and on file shares.

Hey! Where are my properties?

In order for SharePoint to index the properties of your image files, including the file extension, you need to install an IFilter for the image types you are interested in. There are several on the market. I have used the following two:

For the examples in this post I am using the XMP Filter from the IFilter Shop. I have used the Aiming Tech filter and have found it to be limited and the support non-existent. They don't respond to e-mail (or update their web site). The IFilter Shop, on the other hand, has real people who support their products. Additionally, you can create custom property maps for your images. This means that if you create images with custom metadata, you can configure the XmpFilter to return that custom metadata to the index. You get what you pay for.

IFilter Installation and Troubleshooting

The free IFilter Explorer is a great diagnostic tool for troubleshooting IFilter installation. After installing this utility on your server, open it and select the Office Server "12" tab. Notice that GIF, JPEG, and JPG are all associated with the HTML IFilter. PNG files are not associated with any filter.

Installing the XMP IFilter is easy enough. The IFilter needs to be installed on the server that is running your Index Service. (If you want to associate images with your file types that will be returned by SharePoint, the images are installed on the Web Front Ends.) Following the installation you will notice that GIF, JPEG, JPG are now associated with the XmpFilter. The installation also adds support for PNG files.

Crawl Again

Following the installation of the XMP IFilter you must re-index all the content with a full crawl. Following the crawl you can test your results by executing the property query "fileextension:jpg" and notice the difference in the results from Part 1:

I get 42 results, 40 are the images that I loaded for the test, 2 are the out of the box images that ship with the site collection. OK, now we're cookin'. We are returning all of our images and we are able to find them with property filters and the help of our new IFilter.

Crawled Properties and Managed Properties

When the indexer crawls documents the IFilter associated with the file type returns "Crawled Properties". SharePoint keeps track of these properties but does nothing with them unless they are promoted to "Managed Properties". Out of the box there are over 100 managed properties. You can add your own managed properties or edit existing properties.

Add Properties to Results

The Selected Columns property of the Search Core Results Web part is where you add additional Managed Properties to the search results interface. I always add ContentType and FileExtension to the default list of properties:

<Column Name="ContentType"/><Column Name="FileExtension"/>

As you add Managed Properties it is a good idea to add the columns to your XML view to aid in troubleshooting. In our case we want to add additional picture properties PictureWidth and PictureHeight.

<Column Name="PictureWidth"/><Column Name="PictureHeight"/>

At this point your XML results should look something like this:

Why don't I see all my properties?

You may notice that the files returned from the File Share and Document Libraries do not include the PictureHeight and PictureWidth, though properties are returned by the Picture library and Publishing Images libraries. In the next installment we'll detail how to configure the crawled properties returned by the IFilter and map them to Managed Properties.

Posted by Matthew McDermott on Saturday, 30 Aug 2008 12:00
8 Comments | Filed under: Search, Tools, Web Publishing
Bookmark this post with:        

Comments

On 28 Sep 2009 06:46, James Zhou said:

Matthew, I have followed your part1 and part2 configuration. I have installed a trial version of the ifilter. However the image search still does not work as expected. By the way, we are using Ontolica Search for moss 2007 on top of SharePoint search engine. Can you give more advice on where I should look into the issue? Thanks James

On 29 Sep 2009 08:02, Matthew said:

James, Can you give me more detail? What results are you seeing. What crawled properties are you seeing returned? I have not used Ontolica, never had the need for it. The first thing I would do is test that the iFilter is installed correctly. Matt

On 01 Dec 2009 12:52, Will said:

Matthew, I installed the IFiltershop xmpfilter, restarted the search services but jpg-files aren't crawled any more: "the element couldn't be loaded". IFilter Explorer shows that jpg files are listed under XmpFilter.dll. Is it perhaps important that the xmpfilters are almost the only ones that have "no" in the column "signed"?

On 02 Dec 2009 07:07, Matthew said:

I would check the registration for the JPEG extension in the registry for MOSS. I have not had an issue with the XMP filter. Are the files really large?

On 04 Dec 2009 07:45, Will said:

IFiltershop told me in certain system environments only their trial version can cause problems. They are working on this.

On 05 Dec 2009 02:11, Matthew said:

Great, I have always found them VERY helpful and responsive.

On 05 Jan 2010 11:40, Allan said:

Matthew, I have been following your article, step-by-step. At the end of part one, I have a search that returns the PictureLibrary and FileShareImages, as did your tutorial. Continuing with Part2, I installed the iFilter, checked (using IFilterExplorer) that the iFilters were mapped to the various file extensions. I then did FULL crawls and re-executed the same property search. The results are still not showing the images from the DocumentLibrary. Any suggestions where to start looking?

On 06 Jan 2010 09:20, Matthew said:

Allan, make sure that there are no permissions issues for the DocLib. For example add a few Word docs and see that you can search for them. Recheck your file extensions in Search Administration too. Check the Crawl logs and see if there are entries for the library.

Comments are disabled