In this article we will be seeing about Searchable columns in SharePoint 2010. You can exclude site columns from search and indexing. Go to Site Actions => Site Settings => Site Administration => Searchable Columns. Using C# exclude columns: using (SPSite site = new SPSite("http://servername:1111/")) { using (SPWeb web = site.RootWeb) { SPField field = web.Fields["_test"]; field.NoCrawl = true; field.Update(); } }
Using powershell exclude columns: $site=Get-SPSite "http://servername:1111/" $web=$site.RootWeb $field=$web.Fields["_test"] $field.NoCrawl=$true $field.Update()
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: