Monday, February 22, 2016

When query by content type name use SPContentType and not ContentType

If you are to query in SharePoint using search using the name of a content type, be sure to query using the managed property SPContentType and not ContentType. The latter contains extra data, and will usually fail you.

Use SPContentType=Document, and not ContentType=Document

Of course you can query using ContentTypeId instead if you have the id.