Forum Discussion
nipW
Mar 25, 2021Brass Contributor
News web part filtering
Hi All, I have a news web part on a hub site that gets news from all associated sites. I want to show news only when the news type = Main News AND IsActive = Yes. When I add Two filters under th...
Mar 26, 2021
No. At least at the current version, it's not possible to modify the actual query.
One out-of-the-box alternative is to use Highlighted Content Web Part, where you can define the exact search query. Of course, layout options are different.
If you want to fully customize the search query and the result layout, the PnP Search result web part is the way to go. https://microsoft-search.github.io/pnp-modern-search/
One out-of-the-box alternative is to use Highlighted Content Web Part, where you can define the exact search query. Of course, layout options are different.
If you want to fully customize the search query and the result layout, the PnP Search result web part is the way to go. https://microsoft-search.github.io/pnp-modern-search/
nipW
Mar 26, 2021Brass Contributor
Found that if you use same filter type it will take OR but if you use different type filters it will take AND. E.g managed property AND Title contains/Created by etc.
- Patryk_TLJul 05, 2023Copper ContributorIt makes no sense, but it is as you describe 🙂 When you use Title as page property criteria (instead of just Title as a criteria) it switches the logic from OR to AND. Thank you for sharing - it helped me a lot.