Forum Discussion

stowe447's avatar
stowe447
Copper Contributor
Oct 23, 2019

Highlighted Content Web Part - filter on certain document library and tags

Hi,

We saved all our "Final" documents in a particular site.   For example:  I have "Final" Training Document Library in a specific site that called Find It Here (FIH).  With the FIH site, we also have other "Final" documents libraries broken out by target audience.  We have created a communication Training Site Collection where we would like to showcase only certain training materials based on our tags (Group) and (curriculum functions). 

In this case - I have my filter  based on specific site.  Since I do not have an option to indicate a specific document library within the site (I will be nice to have the option), I have layered in Filter by "Managed Property" using "Contains".  At the end of the day based on my filter criteria within the document library - i should ONLY see 7 documents.  Based on the results, it returned 12 documents.  Why is it?  I am confused how the Highlighted Content Web Part works?  What can i do to eliminate some of the documents?

  • Hi stowe447!

     

    When filtering with managed properties, logical operation in the search query behind is OR for all managed metadata filters. Highlighted Content will return an item, when at least one of the managed metadata filters is true for that item.

     

    Here is an example what a search query looks like.

     

    How about using Custom Query and KQL filter, where you can write your own search query. If you want just to display items from a certain document library, you can use "Path:<url to document library>" on your search query. For example

     

    Path:https://tenant.sharepoint.com/sites/site/Shared%20Documents AND (Curriculum..:"Guest Speaker" OR Curriculum...:"Governance")

     

     

     

Resources