To achieve that I would recommend to create a Search Scope and then apply a set of rules that will basically prevent the unwanted items to show up.
The rules are:
*://*allitems.aspx* Exclude
*://*webfldr.aspx* Exclude
*://*mod-view.aspx* Exclude
*://*my-sub.aspx* Exclude
*://*/lists/* Exclude
*://*lists* Exclude
And here is how it should look once you entered them
For us, PowerShell entusiasts, here's how it looks :)
write-host "Enter the Search Service Application Url where you need to apply the crawling rules:"
[string]$SearchServicerUrl = Read-Host #i.e. Enterprise Search Service Application
New-SPEnterpriseSearchCrawlRule -SearchApplication $SearchServicerUrl -Path "*://*webfldr.aspx*" -CrawlAsHttp 1 -Type ExclusionRule
New-SPEnterpriseSearchCrawlRule -SearchApplication $SearchServicerUrl -Path "*://*mod-view.aspx* " -CrawlAsHttp 1 -Type ExclusionRule
New-SPEnterpriseSearchCrawlRule -SearchApplication $SearchServicerUrl -Path "*://*my-sub.aspx*" -CrawlAsHttp 1 -Type ExclusionRule
New-SPEnterpriseSearchCrawlRule -SearchApplication $SearchServicerUrl -Path "*://*allitems.aspx*" -CrawlAsHttp 1 -Type ExclusionRule
New-SPEnterpriseSearchCrawlRule -SearchApplication $SearchServicerUrl -Path "*://*/lists/*" -CrawlAsHttp 1 -Type ExclusionRule
New-SPEnterpriseSearchCrawlRule -SearchApplication $SearchServicerUrl -Path "*://*all forms.aspx*" -CrawlAsHttp 1 -Type ExclusionRule
Happy Powershelling!
Happy Powershelling!
No comments:
Post a Comment