Monday, December 29, 2014

Solution to cannot search content in the Description field of a list

Got the scenario where someone had created a custom list in SharePoint and been so adventurous as to add a custom column to that list named Description. Talk about a bold move!

image
What happens in this scenario is that the column data is mapped to a crawled property named Office:6, and not ows_description which would be the natural property following the column –> crawled property naming convention. The Office category crawled properties are usually used for metadata coming from inside of Word, Excel and PowerPoint files, not list columns (See this old post from 2008), so I’m guessing an “edge case” bug :-)

Office:6 is by default mapped to the managed property named Description, which happens to be configured as not being searchable – meaning content from this managed property will not be available for full-text search.

See more in What makes a SharePoint column searchable?

image

Looking at the list item above, a search for “tale” would return a result, while a search for “heart” would not.

image

Solution 1 – for existing content

To solve this you create a new managed property named TotalRecall (or any other name you fancy), which you mark as searchable. (See Better Best Bets with Lists, for a mention of the opposite managed property I name NoRecall)

image

Next map the crawled property Office:6 to the TotalRecall managed property.

image

When you now kick off a new full crawl, to ensure all items having a column named Description is being re-indexed, then the data in this column will be included in the full-text index and made searchable. To test if it works, type a term from the Description column and filter the list….and you should see items returned.

image

Solution 2 – for new content

If you are creating new lists and can control it, don’t name a column Description, but name it something like MyDescription, and then rename it afterwards. Then you won’t find yourself in this weird scenario.

1 comment:

  1. Thank you so much for this post! It resolved the problem encountered in our SharePoint site. It would be if Microsoft put this in their documentation or least a warning once detected a list is defined with columns having Description as name.

    Edmund

    ReplyDelete