Showing posts with label Regular Expression. Show all posts
Showing posts with label Regular Expression. Show all posts

Wednesday, 13 January 2016

Crawl Rule to Exclude User Profiles in SharePoint 2013

Crawl Rule to Exclude User Profiles in SharePoint 2013

We got a requirement of excluding some of the Test and admin users profiles from the Search Results so that it does not appear in search results. I could not found any of the solution from Google , so thought of writing this post , hoping it can help somebody.

I tried many rules but they all failed and than I thought of Using Regular Expression as it is supported in Crawl rules.

So here is what worked for me for my user profiles to be excluded :

http://mysite.domain.coml:200/person.aspx[?]accountname=Domain%5Ctest.*

Please check
1.  Use regular expression syntax for matching this rule
2.  Exclude all items in this path
3.  Exclude complex URLs (URLs that contain question marks - ?) 






Example of user profile that get excluded is http://mysite.domain.com:200/Person.aspx?accountname=Domain\test.user3 


Thank You for reading.