I added the PnP search SPFx web parts as mentioned in this link @ https://techcommunity.microsoft.com/t5/microsoft-365-pnp-blog/using-the-pnp-modern-search-web-parts/ba-p/2239771

Now inside the "PnP - Search Results" web part, i defined the following to show SharePoint Pages:-

enter image description here

enter image description here

The above is working well where it is retrieving all the SharePoint pages as per the "Refinement filters".. but is there a way to do extra filter/refiner to ONLY show the Pages that have been promoted/posted as News, and not to show all the Pages (even the ones that have not been posted as News)?

Edit: I tried to use the PromotedState managed properties as follow:-

enter image description here & enter image description here

But i will always get zero result...

EDIT - 2 I modified the refiner as follow:-


and now the search result is only showing modern pages posted as News. but i define a "PnP - Search Filters" and i chose the "SiteTitle" as the fiilter, but the filter drop-down will only show 2 sites titles (Testing & Hub) as follow:-

enter image description here

while i have atleast 3 sites where the News pages are coming from (testing,Hub & Technology), as follow:-

enter image description here

so why the "PnP - Search Filters" is not showing all the site titles from the "PnP - Search Results" web part? any idea?


Try to use PromotedState managed property to only show the Pages that have been promoted/posted as News.

Different values for this property:

PromotedState=0 => this is a page

PromotedState=1 => this is a news post, not published

PromotedState=2 => this is a news post, published

  • i tried this but the web part will always return zero result.. can you check my edit please?
    – john Gu
    Nov 15 '21 at 12:02
  • 1
    Both KQL (Keyword Query Language) and FQL (Fast Query Language) expressions work here, I could reproduce your issue when use FQL, as a workaround, use KQL as shown below: PromotedState:2
    – Julie_MSFT
    Nov 16 '21 at 9:01
  • yes your point is correct, the PnP Search Result is now only showing the News pages.. but the "PnP - Search Filters" web part is not working correctly.. can you please check my edit - 2 section inside my original question ?
    – john Gu
    Nov 16 '21 at 21:21
  • Please check if you specify the "# of values" setting, which means the maximum number of filter values/buckets to return, make sure the value is greater than the number of sites.
    – Julie_MSFT
    Nov 18 '21 at 2:49
  • i already define the number of values to be 15 ... not sure why it is not working? is it working as expected at your end?
    – john Gu
    Nov 18 '21 at 17:21

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.