Dot Net Mafia

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog



Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for Ionic, SharePoint, and Office 365.

How to: Querying Enterprise Search by Content Type

A colleague asked me today how he could formulate a search query by content type today.  I figured it was as simple as doing  a keyword query by content source, but wasn’t sure so I decided to go check.  I took a look and there is a ContentType managed property so I decided to use it as in the following example.

ContentType:”Company Document”

In my example, I wanted to return all documents that were of type Company Document.  This in fact worked exactly as expected as you can see in my screenshot below.


This means you can of course display the content type in your search results if you want by modifying the selected columns XML document of the CoreResultsWebPart.  For more information about customizing search results, see this post.  This is just a quick post today, but hopefully it will help you if you ever need to query in this manner.



Document Type Query: Okay for Horseshoes, Not for Real Life : Beyond Search said:

Pingback from  Document Type Query: Okay for Horseshoes, Not for Real Life : Beyond Search

August 17, 2009 12:07 AM

Leave a Comment


About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2018 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems