0

I am trying to exclude documents from modern search based on a metadata yes/no choice column in a document library.

  • I have created a site CHOICE column called: Document Obsolete: (YES/NO choice option)

  • I have a library with the site column added and some documents in there. I set one document to "YES" for the document obsolete column.

Now the requirement I have is that I would like to use the SharePoint modern interface to search for documents however I do not want documents that have been set to "YES" for the document obsolete column to show up.

Now as I am using a modern communication site with modern search I have tried to add a managed property called documentobsolte and map it to the column but I am lost how to edit the search results for the modern interface?

I am starting to think that I cannot do this.

any help would be great.

1

As per my understanding,

You can use Result Soruces to limit searches to certain content based on your metadata columns. Which works fine in classic experience using Search Box and Search Results web-parts.

But, as you are using modern search experience which gets results from the default result source, If you change the default result source, this impacts both the classic and modern search experiences.

So, I will suggest you to create a classic SharePoint page, add Search Box and Search Results web-parts and bind your custom newly created result source with search results web-part.

Or if you want to leverage SPFx in SharePoint Online modern experience then you can use web-parts developed by community, like: SharePoint Framework modern search Web Parts.

References:

  1. Search experiences in SharePoint.
  2. Differences between the classic and modern search experiences in SharePoint Online.

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.