Modern Team Sites - Highlighted Content filter not work

Brass Contributor

On my FR Tenant i would like to use mts with the new webpart Highlighted Content. I want to use the webpart like a cswp with filter also with managed property.

 

But no filter works: Tested filters with [ME] oder Managed property like contentclass equals STS_Site . In every webparts appears "we didn't find anything to show here".... :(

23 Replies

@David Mehr, this does work. I created a document on my site. Then I added the web part and like you said nothing appeared. Then I selected Pages as content type and my pages were showing up. Then I seleted document as my content type filter again and I got the document below:

 

 

Docs.PNG

 

So it looks like there may be a slight delay.

 

Then I added a filter and again there was some delay. I'm guessing that as this uses search you are depnding on the next search crawl to pick up your data.

 

You might want to have a play with the list/library settings. In advanced settings there is a box "Reindex Document Library or Reindex List". Click this will means that the library has been recrawled.

 

In general when this doesn't work for me I click on the box. Then I add an item. So that when the new item appears in search I know that the latest crawl has run.

 

 

@Pieter Veenstra, thanks for your feedback. That's right, webparts without a filter shows any documents.

 

But webparts with filters doesn't work.

 

In my case i add a filter with managed property created by equals [me], but i can see nothing, but i have created a lot.

And an other case is to show all "SiteCollections", i tested this with a filter managed property contentclass equals STS_Site , also nothing. Or is the webpart highlighted content the wrong way for this case?

Hi  @David Mehr,

 

I just filtered by title and that worked.

 

I then tried filtering by Modified By and Created By and this works if you filter by your display name but you are right that [Me] doesn't work.

@Pieter Veenstra ok.

 

Any ideas for filtering "only" sitecollections?

Hi @David Mehr,

 

I'm guessing that you are looking to build a site collection index rather than displaying content from all site collections. To display content from all site collections you can select the source and set it to All Sites.

 

If you now want to display sites/site collections. Then I don't think that that is possible wiht this web part. The Type and Document Type only include values for 'items'.

If it's a private Group site, then it's a bug which prevents this for working as expected.

Thanks for the feedback David. I have heard from a few folks that we should support standard operators, like [me]. We don't currently support that, you need to use the display name. I've added this to our backlog. Your second example in managed properties works for me if I filter by your example ContentClass = STS_Site, with source = All Sites. Is it working for you now, or still failing?


@John Sanders wrote:

Thanks for the feedback David. I have heard from a few folks that we should support standard operators, like [me]. We don't currently support that, you need to use the display name. I've added this to our backlog. Your second example in managed properties works for me if I filter by your example ContentClass = STS_Site, with source = All Sites. Is it working for you now, or still failing?


Hi @John Sanders,

I see if I use query variables like {User} the variable is expanded when examining the returned JSON, but no results are coming back. Any good explanation to this? I see the web part sends a couple of custom props as well, and are they blocking the execution of good old query variables even though they seem to get expanded?

Hi @Mikael Svenson and @John Sanders I found one variable that did work with the EditorOWSUser managed property; {User.Email} will show the correct results. 

 I miss the oportinity to filter by {today} - anyone know when I can expect this to work?

Any further details on this bug @Mikael Svenson? Is it that all search results don't show/aren't indexed when the group site housing them is Private?

Agree, when picking a date field to filter on it will only accept dates, not valid query variables or KQL keywords like today, yesterday etc.

 

The highlighted content web part needs some adjustments for sure.

Yep, agreeing with you both - was just testing this now to no avail.

@Ulrikke Akerbæk can you give us the full scenario?

 

In HC today you can filter by "Recented changed" or "Recently added", and then set "Since" to "Today". Sounds like that's either too hideen, or not meeting your needs.

 

HC_filter_by_today.png

 

Love to hear how we can improve.

 

Thanks.

@Mikael Svenson - I've added this to our backlog for managed properties. Thanks for pointing it out.

 

We've discussed the idea of adding an "Advanced" tab in the future that allows you to enter your own KQL, which could be how we enable this (as opposed to supporting some things in the "simple" UX, but not others.

 

Would love to know your thoguths on this approach, vs adding standard operators supported in KQL (e.g."today") to the date fields.

Another common scenario would be to list future events, meaning things happening today or in the future. Hence the "since" option is not useful, we would also need a before.

 

Or, having the advanced option would solve all edge cases as us old skool KQL peeps can craft whatever we want :D

 

That said, we also hope you are looking to fix the () bug around contenttypeid, which currently blocks the usage of the web part for almost any scenario. cc @Elsa Naumann

@Mikael Svenson - Private Group document filtering with highlighted content has now been fixed (as of today).

I've set up the Highlighted Content web part to filter using a managed property. When I've got the web part opened on the Modern page, it correctly only shows 3 files. But as soon as I save and close the page the filter isn't applied. When I edit the web part, my filters are there and only 3 files show so I know it is saving properly. What could it be? Yes, I have published the page.

@Julie Sanders - is it you that sees different results when you say... "But as soon as I save and close the page the filter isn't applied." or someone else?

 

Did you originally add the webpart to the page or someone else (e.g. your admin)?

 

Does filtering work on other pages/instances of the webpart (e.g. is it only broken for this page/instance)?

 

Trying to understand more about the symptoms to figure out what's oging on.

 

Thanks,

John