Using Content type as a filter in PnP Modern Search
- Kasper Larsen
- Oct 21
- 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:
creating a new Managed Property "ContentTypeName and mapping it to ows_ContentType.
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.








Comments