Hi Folks! Search in SharePoint is always an important part of organization when a user looks for uploaded content or important updated content. I have come across scenarios where I was asked to implement search across hub sites, communication sites, team sites, SharePoint On-Premises and SharePoint online. And at that point you will question yourself -- which search shall I implement, Classic or Modern Search or PnP search?

In this article, we will deep dive into how to implement search in Modern Hub sites.

What is Search in SharePoint?

Search can be defined as function which helps a user to find the relevant content or information from a defined set of files or documents. In SharePoint search can be used to find files, documents, images, people, SharePoint sites, etc.

Three types of Searches- Classic search, Modern search, and PnP search. Whereas classic and modern search uses same search index to search the content across organization. Administrators cannot turn off these searches, these are turned on by default.

A) Classic Search

Classic search are accessible on SharePoint On-premises and Office 365. You can implement classic search on below sites: -

  1. Publishing sites.
  2. Classic Team site.
  3. Search Center.

Important Aspects of Classic Search

B) Modern/Microsoft Search

Modern search also known as Microsoft search. It provides personalized way of search experience. Modern search can be applied on below list of sites -

  1. Hub sites.
  2. Communication sites.
  3. Modern Team sites.
  4. SharePoint Home Page.

Important Aspects of Microsoft Search

C) PnP Search

PnP search comes to the picture where the user demands a more flexible, personalized, and customized way of search results page. The “Pnp Modern Search Webpart” comes with four Apps as mentioned below and all are interconnected with its own configuration settings.

  1. Search Box- Entered Search keyword.
  2. Search Results-
    • Search Query configuration: Build search query template.
    • Search settings configuration: Get data from Result source.
    • Styling Option Configuration: There are various layout selection option: Simple list, Details list (currently applied on the below screenshot), Tiles etc.
  3. Search Refiners- search filter based on Managed Property.
  4. Search Verticals- configure different scopes by providing the Tab name. it will display the result count against the scope.

Below is the screenshot for the above four apps -

search in sharepoint

Configuration and Deployment of PnP search

Here we will discuss below -

  1. PnP Search Package Deployment.
  2. PnP Search Webpart Configuration.

Description

The purpose of the below is to capture PnP search deployment and configuration.

1. PnP Search Package Deployment.

2) PnP Search Webpart Configuration

You need site collection administrator privilege in current site-collection to perform above mentioned activities.

So, these are ways you can configure PnP search in hub sites.