So I had a fun day last week and today trying to figure out why a managed metadata column would not get consumed within the search indexer for SharePoint 2013. I spent several days on this issue. I spoke with Corey Roth and various other SharePoint people on twitter. I ran at least 6 full crawls within a few days. I had at least 100 tabs open on FireFox and at least 20 google searches going trying to figure out this issue. I sent an email to an internal dl at work. Then finally Shannon Bray spent about 30 minutes with me and sends me an email on how to consume a managed metadata field into the search crawler.
At that point I had this crazy idea what if the “Document” Content Type had some crazy issue and for some reason stopped custom columns from entering the search indexer. I thought this is not possible, but why not try it. I removed the column from the “Document” Content Type and then created a custom content type. Guess what after I threw in a few fake documents with metadata…BAM…It just worked.
So remember guys don’t add any custom columns that you want to be searchable to any of the base content types. You need to go in and create a new custom content type that inherits from the base content type that you want. Then the search crawler will auto index that field once you attach it to a library or list and drop some data in using that column. The column has to be attached to something in a list or library, otherwise it won’t work either. I believe this existed in 2007 and 2010, but I am not sure if the base content type issue exists. I still don’t understand why you can add more columns to a base content type. I think that should not be allowed if you can’t consume the column in the search indexer. There must be some code in the form of a handler or receiver blocking the crawler. Anyway I hope that this saves one of you guys trying to attempt the same thing that I did last week. I do dumb things on accident, so that the rest of you can learn from my mistakes. Until next time…