Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

Exclude a Column from SharePoint Search Crawl

$
0
0
Requirement:
We keep few fields for configuration in a custom SharePoint application and don't want those fields to appear in SharePoint Search results.

Solution:
SharePoint Fields/Columns has a property: NoCrawl, just turn it ON, we can exclude columns from SharePoint Search! Here is how I turned Off search visibility of a field using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Set these two variables accordingly
$WebURL = "http://sharepoint.crescent.com"
$FieldName = "ConfigData"

#Get the Web
$web = Get-SPWeb $WebURL

#Get the field
$Field = $web.Fields[$FieldName]

#Set the search prefererence
$Field.NoCrawl = $true
$Field.Update($true)
It takes effect after a search crawl takes place.

Viewing all articles
Browse latest Browse all 1058

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>