Showing posts with label PnpSearch. Show all posts
Showing posts with label PnpSearch. Show all posts

Tuesday, 21 January 2025

PnP Search - Notes

Overview: I have spent a considerable amount of time figuring out how to use the PnP Search Web parts again.  I do this every few years, as I forget.  This post outlines how to set up filters for the PnP search using my own columns.

Four items to get Filtering working

Tip: Filterable Managed Properties must have a "refinable" search property.  You can't create these in SPO, so use the OOTB Refinable Managed Properties setup for this purpose.

Step 1. Upload content such as docx and pdfs, and add custom metadata.  I added two documents, and there is a text column for Technology


Step 2. Ensure content is being crawled and available thru Managed properties

You need to be a Site Collection Admin > Go to Site Settings for the Site Collection

Navigate to Search > Manage Search Schema > Find an existing "Refinable.." Managed Property and use it to point to the new Crawled Property.

Tip: Force a crawl on the list, and it will take an hour or two, as the trigger is fired periodically. Depending on the size of the crawl, it will take some time.  If it's not showing up after 3-4 hours, you are definitely doing something wrong.

Step 3.
Add Selected properties (this is the Managed Property name or Alias) - paste and move out of input box - weird.
Customise the Layout Slots with the Layout Slot name.

Step 4. Add the PnPSearch Filter Web Part to the page containing the PnP results web part page

Add the Search Filter PnP web part to the search page.

Go to the PnPSearch Results web part properties, and set the "Connect to a filters Web Part" to Enabled and set the Filter web part.

Go back to the PnPSearch Filter web part, select "Configure" and on the Use data from these Web Parts  set to the PnPSearch Results web part.

"Edit" the filters.


Wednesday, 10 September 2014

SharePoint 2013 Search Series - Post 4 - Search Result Removal










The image below shows how to restrict the results displayed using a "Result Source" at the site collection level to display a subset of data.  You can also refine the results displayed using the search result web parts and reducing the result source set.

The test button is useful to see if your refinement/filtering is working.

The 2 screen below allow me to create new Result Sources.  The result source creates a subset of results that can be consumed by search results web parts.


SharePoint 2013 Search Series - Post 1 - Configure Custom Search
SharePoint 2013 Search Series - Post 2 - Refiners
SharePoint 2013 Search Series - Post 3 - Search Box Web Part query Managed Properties
SharePoint 2013 Search Series - Post 4 - Search Result Removal (This Post)
SharePoint 2013 Search Series - Post 5 - Restricting Results & Enable pdf previews
Tips: