When working with SharePoint list and library items – you know there are few available metadata fields out of the box – such as CreatedBy, Created (date) etc. Those are all available out of the box and by default they are populated automatically and you don’t have control over the population logic. Obviously, when something is a part of metadata – it will show up in search.
SharePoint search allows you to specify metadata properties that will be mapped to a specific content and by this you can query parts of fields and return results based on your query.
SharePoint also allows you to query all the fields in your content even if they are not mapped to any specific properties.
This is pretty handy feature but what if you need to exclude certain properties from search. In my case - my users wanted to create blog posts but didn’t want anyone to be able to search for their real Active Directory name and get the results of posts they have written. This seems like an easy fix – all we need to do is to access Search Service Application for that specific site collection and remove CreatedBy and ModifiedBy from a list of fields that are mapped to the actual content.
This approach will work for most of the lists and libraries but not for blog posts.
Blog posts have one more metadata field that stores users name and posted date called PostedByWithDate. If this field is not removed – its value will be automatically populated and displayed and searched against.
One of the solutions is to create a custom site template which is a copy of (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates\Blog) and withing the post list schema (Lists\Posts\schema.xml) remove the
<Field Name=”PostedByWithDate” ID=”{a1944d80-14e6-a71c-b235-3a28329f14b1}” Type=”Computed” ReadOnl …
When a new instance is created of this template – the field will not be there and data will not be populated and therefore available for search.
Good Luck!


