Jun 20 2023 01:12 AM
Dear Community,
I am running into a strange problem with PnP Modern Search for which I cannot find a solution. Would appreciate any input or suggestions. Problem is as follows:
I have set up a search page on my company's SPO site using PnP Modern Search. It is meant to search for documents stored in various libraries on that site. However, when I run the search it does not find/register some items and metadata-- seemingly at random. For example, when I set the vertical in my search page to display one library, it will return 22 documents when the library actually contains 33. Of those 22 documents, some are missing metadata. For instance, Document A will have a value for the site column called 'DocumentType' but Document B (in the same library) will not show any value. This means I cannot correctly filter the results.
If I look at debug view, Document B's value is 'null' in the relevant 'RefinableStringXX' field. If I look at the document in the SP Online library though, the item has a value in that column and all metadata is filled out like normal. Any idea why the search is not picking up only these certain documents/metadata? It happens in all libraries on the site.
Steps for re-creating problem:
I tried asking the developer community of PnP Search and they redirected me here. I can also provide more information if needed. Thank you in advance!
Jun 20 2023 01:22 AM
Solution
Is Content Approval enabled in your library? If it's enabled then Search will crawl only documents which are approved.
Another thing you can try by getting same search result using SharePoint Search Query Tool and verify whether here you are getting value in Refinable Managed Properties or not? so that you can at least have a idea whether it's PnP Search issue or crawling issue?
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
Jun 22 2023 01:29 AM
Jun 20 2023 01:22 AM
Solution
Is Content Approval enabled in your library? If it's enabled then Search will crawl only documents which are approved.
Another thing you can try by getting same search result using SharePoint Search Query Tool and verify whether here you are getting value in Refinable Managed Properties or not? so that you can at least have a idea whether it's PnP Search issue or crawling issue?
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community