PNP Search filters when search results look into different sites

Marina Cicchi 1 Reputation point
2024-11-20T13:36:06.8466667+00:00

Hello good afternoown.

I am creating a search page that has a PnP search box, PnP Results box, PnP Filters

on the results box, under Query text i have the path to the different sites i want it to look into, and i know that part works, because on the results i can see things i know are on a different site.

In both sites, i have 2 columns "Document Type" and "Document Owner" they are both Choice type columns and they are identical in site 1 and 2.

Site one, has mainly as Document type "Policies, Procedures, ToR, Manuals" Site 2 has "Forms, Templates'

On both sites the columns have the same name, were created as Site Columns and (in both sites) Document Type has been mapped to RefinableString02 and Document Owner to RefinableString100 (I tried to see if i could map them in one site and have it working in both, but that didn't work either)

The search page is on site 1
If i use the Search Box and type the name of a Form (that sits in Site 2) i can see the file on the search results.
If i do not type the name of the file, but i try to use the filters and select Forms, that option is not on the list, the list only shows the filters related to the document types that are on site 1

I tried, re doing it all 2 times and nothing,

I tried tried creating the columns in site 1 and 2 with the same name, and mapped to the same RefinableString (both in site 1 and 2)
I tried giving the columns in site 1 slightly different names than in site 2, and then map them both to the same Refinablesting but it didn't work either.

Is what i am trying to do even possible?

thank you all

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,071 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 25,806 Reputation points Microsoft Vendor
    2024-11-21T02:21:05.1466667+00:00

    Hi @Marina Cicchi ,

    It sounds like you're encountering issues with the filters not displaying the expected options from different sites in your PnP search implementation. When using choice type columns as filters in SharePoint search, it's important to ensure that the managed properties are correctly configured and that the crawled properties are properly mapped.

    Here are a few things to consider:

    1. Managed Property Configuration: Ensure that the managed properties for "Document Type" and "Document Owner" are set as searchable and allow multiple values. This is crucial for them to be used effectively in search filters.
    2. Crawled Property Mapping: When mapping the crawled properties to the refinable managed properties, make sure you are selecting the correct crawled properties. The naming convention is important; use the crawled properties with the prefix.ows_
    3. Refinable Managed Properties: Since you are using the same names for the columns across both sites, ensure that they are indeed mapped to the same refinable managed properties in the search schema. If they are not, the filters may not recognize the values from both sites.
    4. Full Crawl: After making any changes to the managed properties or the search schema, perform a full crawl to ensure that the changes take effect and that the search index is updated.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.