Updating the Search Query Modifier
Git branch
This section uses the https://github.com/PacktPublishing/Mastering-SharePoint-Development-with-the-SharePoint-Framework-/tree/chapter13/update-search-query-modifier Git branch from the repository.
In this section, we will see how to update the search query with the Search Query Modifier so that we can achieve the business requirement mentioned in Requirement 6: searching for a product from site of Chapter 4. The search query needs to be updated in such a way that the search term entered by the user points to the product reference.
In an ideal scenario, we would want to use the modified query in a Web Part that uses the SharePoint Search API to return results. Since we are not using the SharePoint search API in this book, we will use the Products Catalog Web Part as the search results Web Part, such that it filters the results (products) based on the modified query.
In this case, the Web Part should show products whose product...