This project is read-only.

Content Types in Faceted Search

Jul 22, 2008 at 5:58 AM

The set up and install of the faceted search worked great. However, I am having one issue.

Some content types that I have created in SharePoint are not showing in the 'Content Type' section. I have run a few tests and found the following:

List content types work fine
Document Content Types using word as the application return a display name of "application/". The count is correct. However, when I click on the mapping it returns no search results
Document Content Types using Excel as the application return a display name of "Excel 12" as per the default mapping. The count is correct. However, when I click on the mapping it returns no search results.

Have I missed a step somewhere here to configure document content types?
Jul 28, 2008 at 11:51 AM
Edited Jul 28, 2008 at 11:58 AM

This is how Faceted Search  works out of the box, however you can configure Faceted Search to work as you want.

The problem is that Faceted Search uses a Managed Property called ContentType whcih is mapped to ContentType and Mimetype (and prefering the MimeType) of any item in SharePoint. This is ok for list items, however for documents this is causing the problem your describing. Splitting the Managed Property into two Managed Properties fixes the Issue. Changing the ContentType Managed roperty isn't possible, therefore you will need to create two new Managed Properties.

This is what you need to do:

Create two Managed Properties

ContentType2 and map this to ows_contenttype
Filetype and map this to basic(5)

Then include the following xml in the xml that you configure Faceted Search properties with.

<Column Name="ContentType2" OrderBy="Hits" TotalResults="10" DisplayName="Content Type" DefaultImage="STS_ListItem16.gif" /> 
 <Column Name="FileType" OrderBy="Hits" TotalResults="10" DisplayName="File Type" DefaultImage="STS_ListItem16.gif" > 
       <Mapping Match="message/rfc822" DisplayName="Email" Image="iceml.gif" />    
       <Mapping Match="message" Image="icmsg.gif" />
       <Mapping Match="application/octet-stream" DisplayName="Message" Image="ICMSG.gif" />
       <Mapping Match="text/html" DisplayName="Html" Image="html16.gif" />    <Mapping Match="text/plain" DisplayName="Text" Image="ictxt.gif" />
      <Mapping Match="text/xml" DisplayName="Xml" Image="ICXML.gif" />
      <Mapping Match="application/xml" DisplayName="Rss" Image="ICXML.gif" />
      <Mapping Match="application/" DisplayName="PowerPoint 12" Image="icpptx.gif" />
      <Mapping Match="application/ " DisplayName="PowerPoint" Image="icppt.gif" />
      <Mapping Match="application/" DisplayName="Excel 12" Image="icxlsx.gif"/>    <Mapping Match="application/" DisplayName="Excel" Image="icxls.gif"/>
      <Mapping Match="application/msword" DisplayName="Word" Image="icdoc.gif"/>
      <Mapping Match="application/" DisplayName="Word 12" Image="icdocx.gif"/>
      <Mapping Match="application/vnd.visio" DisplayName="Visio" Image="icvsd.gif"/>
      <Mapping Match="text/html; charset=utf-8" DisplayName="Web Page" Image="ichtm.gif"/>

Don't forget to run a full crawl.


Pieter Veenstra
Content and Code

Aug 14, 2008 at 1:57 PM
I've done something similar, except I just want to use the content types. However, I experience very strange behaviour regarding number of hits for these facets from content types. I've just tested with the new 2.5 beta version, but I still have the same issue.
A simple example: a search for "test" gives me the facet "Items (5)" in the facet Web Part. When I apply this facet to the search, the core result Web Part shows 35 hits, and so do the facet Web Part...

Anybody else experienced this, or have any suggestions to what can be the cause? Is it the faceted search, or could there be something with my configuration (I've changed scopes, made new search pages and some other).

Jan 13, 2009 at 2:46 PM

Even I hav a similar requirement. I would like to know how is our Custom Managed Property is being added in the facets. How is the mappings done.

I have a created a managed property called "KBNetManagedPpty" and its having a mapping called "ows_ParantCategoryID(Text)" which is infact a Custom List Field. In the Faceted WebPart XSL I have added the following to bring my custom Manged Property in search result.

<Column Name="KBNetManagedPpty" OrderBy="Hits" TotalResults="5" DisplayName="KB Net Custom Property" /> 

But this doesnt work for me. I would like to know what <Mapping> and 'match' should be provided.

Can any one help me.?

Jan 13, 2009 at 4:52 PM
Did you run a Full crawl after creating a custom Managed property?
Mar 3, 2009 at 8:02 PM
Edited Mar 22, 2009 at 2:19 AM
Running MOSS Faceted v 2.5 on MOSS 2007 with dec08 infrastructure update.

I am having the exact issue described in this thread.  I have followed the instructions above exactly as stated.  After created the metadata items i reset the crawl content and then performed a full crawl.  i placed the modified xml data from above into the webpart but i'm still have the exact same problem. 

I took this a step further and changed the metadata mapping in the above xml for the column name "Filetype" and replaced it with "FileExtension" and magically of course, all of the documents/filetypes now display in their correct file extension categories.  Since i'm able to change the name mappings to a new display value, then this kind of is a work around until i can figure out why the solution provided above still does not work.  Any insite or comments on the issue, resolution, or described workaround would be most appreciated.

By the way, i really enjoy this faceted feature, is there a way to get this to pull results for federated search option?

I stumbled upon this post and did some research on the mime-type issue.

I'm not sure if this will get fixed at all by Microsoft, but i'm running my sharepoint server in a windows 2008 server environment, under iis v7 using v6.  I looked into modifying the mime-types in IIS 7, or possibly the xml metabase file in system 32.  However the metabase file is considerably different than the version 6.  Looked into the mime-types that are registered in IIS 7 and they all seem to be correctly installed to support Office 2007 mime-types. 

Just as described above and in the thread provided, i too can modify the mime-type "application/" to "application/" and all of the DOCX documents show up in search.  Scratching my head now and wondering what the heck.

Does anybody know if Microsoft has this on a fix list?  Does anybody have an idea on how to adjust the environment to get it working the way it should?
Apr 1, 2009 at 1:02 PM
Is it possible to collapse more entries in one?
In config we have:
        <Mapping Match="application/msword" DisplayName="Word" Image="icdoc.gif"/>
        <Mapping Match="application/" DisplayName="Word 12" Image="icdocx.gif"/>
        <Mapping Match="application/" DisplayName="Word 12" Image="icdocx.gif"/>
       <Mapping Match="text/html" DisplayName="Html" Image="html16.gif" />
       <Mapping Match="text/html;charset=UTF-8" DisplayName="Html" Image="html16.gif" />

Interesting is to see number of Word documents as one item (not hits per Word document version) and also on click to see all Word documents in result list.
Maybe, group by "DisplayName" in faceted block and change link to inlude all grouped Content Types in result page.

or another question:
       Is it possible to control and update Content Type during crawling?
Apr 1, 2009 at 3:43 PM
This feature can be requested via Issues. It is not in a 3.0 list