I am working on SharePoint Server 2013 enterprise edition. I have an Enterprise wiki site collection. In the library there is a managed metadata column named Status with these options:

  1. Draft
  2. Reviewed
  3. Under process
  4. Final
  5. Cancel

I am trying to find a way to exclude from search all the wiki pages that have their Status managed metadata column set to Cancel.

How can I define a rule inside SharePoint search to exclude all the wiki pages that have a certain term selected?

Let's say someone search for the word steps, then I want the search to show all the wiki pages that have the word steps inside it, excluding the wiki pages that have their Status as Cancel

  • why down vote, any reason ? – john Gu Jun 8 '16 at 13:52
  • 1
    First of all, SharePoint search does not support suffix matching (*teps). So that part will not work. – Robert Lindgren Jun 8 '16 at 14:03
  • And the downvote was probably due to the extreme lack of formatting of your question – Robert Lindgren Jun 8 '16 at 14:04
  • @RobertLindgren so i can not exclude wiki pages based on their managed metadata value ? to say for example not to show any wiki page that have its status = "cancel" inside the search result ? what what is the relation between suffix matching and my question ? – john Gu Jun 8 '16 at 14:11
  • 1
    Sure you can. But you state "Let's say someone search for the word teps, then I want the search to show all the wiki pages that have the word steps inside it" (note the lack of s in the beginning of the word steps). This is not something SharePoint search can handle – Robert Lindgren Jun 8 '16 at 14:16

Why not just secure the content with a workflow if the status changes? If it's secure it will not show in search.

You could also eliminate the content from the default result source, but I'd prefer security.

  • @Matthel so what do you exactly mean by securing the content with a workflow, i did not heard of this approach before? second point i went to Central Administration>Managed Service>Search Service, then i copy the default "local sharepoint results" . then i modify the default query using the "Query builder" by adding this WikiCategory<>"cancelled" to the existing query. so i ended up with this query {?{searchTerms} -ContentClass=urn:content-class:SPSPeople} WikiCategory<>"cancelled" .. and seems this will exclude any wiki page which have its wikicategory=cancelled,, so is my approach correct? – john Gu Jun 10 '16 at 1:09
  • Sounds correct. Users will still be able to get to the content, but that will work. My point about permissions is, if you don't want folks to access the content, secure it, then you will get the same effect in search as the users will not find content that is secure. – Matthew McDermott Jun 10 '16 at 12:12
  • i want users to be able to access the content if they know the url , or there is another page which is referencing the pages... but i want the wili pages to be hidden inside the search results.. – john Gu Jun 13 '16 at 0:52

Maybe you could make a search scope. You would need to make your column a "managed properties" and then add 4 rules for = everything but canceled.

  • can you adivce more on this ? now the search will include other pages which might not have the Status field at all... my question is how to exclude wiki pages that have certain term , but if there is other page sor documents to include them – john Gu Jun 8 '16 at 15:49
  • can you adivce further ? – john Gu Jun 9 '16 at 13:54
  • It all depends on how you set up your search results. To be honest, I haven't had to do this for our organization, but I am always watching for an opportunity. Information to get you started can be found here. sherweb.com/blog/… – Jammin4CO Jun 9 '16 at 18:36

Search also has the ability to remove result by URL. You could enter the URL of the canceled page manually and it will be added to the crawl rules and no longer be returned as a result.

  • but i do not want to exclude each page separately.and if i want to do so it will be easier to edit the SEO properties of the wiki pages and exclude them from search.. but i do not want to do this per page .. – john Gu Jun 8 '16 at 15:47
  • can you adivce further ? – john Gu Jun 9 '16 at 13:54
  • I understand your concern, but you are already stating that you intend to toggle a property to "canceled". What is the difference in adding the page URL to the do not crawl rules instead. – Jammin4CO Jun 9 '16 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.