top of page

Using Content type as a filter in PnP Modern Search

Writer: Kasper Larsen
Kasper Larsen
Oct 21, 2025
1 min read

One of the cornerstones of good information architecture is content types, and therefore we often use the content type as a criterion in our search queries. But why not use the content types as a refiner too?



The default mapping provided by Microsoft is not optimal:


So if we look at the value in "ContentType" for a site page it looks like this:


So, I recommend updating the mapping by:

  1. creating a new Managed Property "ContentTypeName and mapping it to ows_ContentType.

  2. Mapping one of the existing RefinableStrings to the same crawled property.


Now you have both a free text searchable property and a sortable/refinable property.






 
 
 

Recent Posts

See All
Dashboard in PnP Modern Search

I have a service that monitors what people are writting about Modern Search and Matthew Both "dared" in https://lnkd.in/p/e5Gekgfd to claim that setting up a Modern Search page can be tedious at times

 
 
 

Comments


30103817

  • Twitter
  • LinkedIn

©2023 by M365thinking. Proudly created with Wix.com

bottom of page