I use CAML queries to find items by "ContentTypeId".
How can I create an index for this column? In the user interface I can only select "Content Type", not the ID.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
You can use
SPField.Indexable Property to check whether
ContentTypeId field can be indexed or not. Per this http://iedaddy.com/2010/11/sharepoint-2010indexing-columns-in-a-sharepoint-list/ Content type ID cannot be indexed. However, one of the comments mentions that
Creating an index on “ContentType” really creates an index on “ContentTypeId”, that makes searching for a contenttype in a sitecollection much faster.