Forum Discussion
Unusual Search Results in Sharepoint "PnP Search Results"
- Feb 04, 2025
Hello js10
do you save site pages in a folder, right?
Currently it's not possible to approve a folder via the SharePoint GUI. Last time we create a Power Automate Flow to set a folder as "Approved".
Best, Dave
Yes, the pages which I am expecting in the results are published and approved, and keyword means whatever I am typing in the pnp search box.
Shall I reindex the site? It shows it can take weeks to update, is it risky or shall I just do it?
Hi js10
you can only reindex the site pages library: https://learn.microsoft.com/en-us/sharepoint/crawl-site-content?WT.mc_id=DX-MVP-5004845
To verify your issue you can use the Search Query Tool, with that free tool you can check the query and properties, that you use in queries: https://microsoft-search.github.io/pnp-modern-search/using-query-tools-to-verify-issues/
Best, Dave
- js10Feb 04, 2025Copper Contributor
Hey
I reindexed the pages and it made no changes in the serch results.
However I found the root of the problem.
I tested a few cases and the iusse is with the approval status of the folders.
I the file is inside of the 'Approved Folder' then it appears in the search result.
The key issue is that I do not know how this folder gets 'approved'. For example I created a folder and all of the files inside it are published, still the approval status of the page is 'pending'.
So is there a way to 'Approve' the folder itself? If there is, that'll be the ultimate solution.
Thanks!
Sanket
- DaveMehr365Feb 04, 2025MVP
Hello js10
do you save site pages in a folder, right?
Currently it's not possible to approve a folder via the SharePoint GUI. Last time we create a Power Automate Flow to set a folder as "Approved".
Best, Dave
- js10Feb 05, 2025Copper Contributor
Hey,
Thanks for the idea, I did create a power automate workflow and it worked!
I can approve the folders. But there still persists a new issue.
case 1: Created a new folder, approved it, published files inside it, they are appearing in the search results
case 2: Approved an already existing folder and the files inside it are not appearing in the search results.
Do you have any idea about the reason?
Thanks,
Sanket