PnP Modern Search has paved the path for organizations using SharePoint Online to create customized search pages as well as search-driven applications. While the standard Microsoft Search has limited customization and configuration options, PnP Modern Search hit a sweet spot between customization, security, and freedom by introducing a set of modern web parts.
PnP Modern Search had stabilized itself until version 3, but the need for using the Microsoft Search API resulted in a new major version with new architecture.
Introduction to Keyword Query Language (KQL) – Part 1
If you are looking to deploy PnP Modern Search but not sure which version to deploy, or if you want to know if should upgrade to version 4 from version 3 or retain version 3 – this post is for you.
- The refactored codebase is the first significant change in version 4.
- The addition of Microsoft Search API can make a massive difference if you are looking to search for Microsoft search entities such as OneDrive, external items, sites, list items, etc.
Microsoft Graph toolkit
- The Microsoft Graph toolkit integration provides a set of ready-made web components that can be used to access data from Microsoft Graph quickly and easily.
New layouts in search results web parts
- The search results web parts include the old features from version 3 and the new additional features.
- The existing layouts and options are more enriched and improved.
- A new slot feature has been added in version 4 to define data sources, field mapping, and you can also create new reusable layouts using the templates.
- But the search results web parts for version 4 lack the Sort by dropdown feature present in version 3.
Search verticals web part
- You may easily configure various scopes of search within the search verticals web parts, and the vertical web part controls the visibility of the related search results web parts.
- There are no query template options within the verticals as in version 3.
- The input query text options, search results filter web part, and the search verticals web parts have been moved together to the available connections tab helping you easily configure all the connections in one single page.
- Each search vertical can use a Search Results web part on the current page, or redirect to a separate page – another SharePoint page or any URL outside of SharePoint as needed.
- You may use this new configuration option to create complex queries and layouts for specific tabs, allowing you to match numerous search results to a single page that was missing in version 3.
Search filters web part
- The search filters web parts help connect filters to and from multiple Search Results web parts, and in version 4, the behavior was refactored with a new approach.
- In the search filters web, you can select the templates for a particular refiner which is the same as version 3.
- For the check box template, version 3 had multi-value and single value connection options, but version 4 has just one filter to select multi value option or not.
- Multiple Search Results web parts can be easily filtered using one single Search Filters web part.
Search Box web part
- The search box web part comes with the additional features of multiple query suggestion sources that can be custom created using extensibility features.
- It is the latest feature with version 4 where you can add custom libraries. These custom libraries help you enhance the capabilities of the search web parts.
- Here custom layouts are used as a replacement for custom renderers in v3.
- There is very clear documentation in PnP modern search web page to help you guide through the extensibility web component creation process.
Because the two versions of PnP Modern search are built on completely different codebases, you can use them side by side. However, it has been announced that no new features will be introduced to version 3, and the focus will instead be on the development of version 4 and Microsoft integration.
As a result, it’s critical to review the new features in version 4 as well as what’s lacking in order to make the best decision.
PnP Modern Search v3: https://microsoft-search.github.io/pnp-modern-search/v3/
PnP Modern Search v4: https://microsoft-search.github.io/pnp-modern-search/
PnP Modern Search Issues (GitHub): https://github.com/microsoft-search/pnp-modern-search/issues
Leave a Reply