6

I am working on an enterprise wiki site collection. and we need to implement an expiry policy for the wiki pages, so if the wiki page is set to be expired or a it is linked to a certain term , then to exclude the wiki page from search. currently i have the following :-

  • Each wiki page is linked to a Managed Metadata column. and this column can have values such as "Project1","Project2","Project3".

enter image description here

  • Also each wiki page is linked to an "Expiry Status" column which have 2 values; Yes,No (default).

  • now the idea of implementing the expiry policy, is that if the wiki page has its "Expiry Status" = Yes, or its Project is expired to exclude the wiki page from the search.

so not sure how i can implement this inside sharepoint , till now i achieve the following :-

  1. i created a new site column named "Expiry Status" , and then inside the Central Administration >> Search Service >> Result Source, i define to exclude any wiki page which have Expiry Status = Yes, as follow:

enter image description here

  1. now for the managed metadata column , i define a Custom Property for all the terms including; Project 1, Project 2, Project 3 named "Show In Search" with default value = true. and users can chnage the value to "No".

enter image description here

  1. but i am not sure if i can modify the Result Source inside the Search Service, to exclude from the search any wiki page which is linked to a term and this term have its custom property named "Show In Search" = No ? is this possible ?

so can anyone adivce on this ? or there is a better way to implement my requirement ?

EDIT

Now i tried the following steps but they did not work.

1) I went to the term store , and i click on certain terms, add a new shared property named "ShowInSearch" with two values either;false or true. as shown below:-

enter image description here

2) then i went to the "central administration" >> "managed services" >> "Result Sources" , then i modify the query using the query builder where i added the following {Term.ShowInSearch}<>"false" to exclude pages linked with a term property named "ShowInSearch" with value = false , as follow:-

{?{searchTerms} -ContentClass=urn:content-class:SPSPeople} {Term.ShowInSearch}<>"false"

Then i run a full scan, but the search will always show the following error:-

Nothing here matches your search

so can anyone adivce on this please ?

  • can anyone advice on this ? – john Gu Jun 28 '16 at 0:54
1

You have two questions.

if i can modify the Result Source inside the Search Service, to exclude from the search any wiki page which is linked to a term and this term have its custom property named "Show In Search"

According to the article here, it is possible to use custom property associated with a term, if you use managed metadata driven navigation. Extract from the article below.

{Term.property} Any property from the property bag of the term, including custom properties.

Now on using this query variables from Result source or Search Webpart, I tried this in Search webpart and you can check if the Result source one works.

so can anyone adivce on this ? or there is a better way to implement my requirement ?

Another way to implement this is to use managed metadata driven navigation and then in the page use a Search/Content Search web part with following query for example.

{Term.property}:"true"

  • thanks for your reply and the links you provide ... but can you please check my edit , as i tried your appraoch but it did not work ... – john Gu Aug 24 '16 at 15:05
  • can you check my edit please ? – john Gu Aug 26 '16 at 1:30

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.