top of page

Using Content type as a filter in PnP Modern Search

  • Writer: Kasper Larsen
    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:

ree

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

ree

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.



ree



 
 
 

Comments


30103817

  • Twitter
  • LinkedIn

©2023 by M365thinking. Proudly created with Wix.com

bottom of page