Forum Discussion
js10
Jan 31, 2025Copper Contributor
Unusual Search Results in Sharepoint "PnP Search Results"
Hello,
I have created a sharepoint page (.aspx) to use it as a search function for all of the sharepoint pages which exist in one single "site".
I have added a "PnP Search Box" and connected it with "PnP Search Results". But when I search a keyword in search box, I only see some of the pages containing that keyword in the search results. I definitely know there are more 'published pages' which contain that keyword. Even with putting the ListId in the Search Results query, I cannot get expected results.
What am I missing here?
For reference this is the query I have typed: {searchTerms} Path:{Site} FileType:aspx
Thanks in advance!
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
- js10Copper Contributor
keyword means just the text i want to search
problem is, the pnp search result is showing results from only few pages out of all existing approved and published pages
query in pnp search results is this: {searchTerms} Path:{Site} FileType:aspx
so it should show all of the pages in current 'site', but it doesn't
can the issue be indexing?, that the recently published pages may not be indexed yet? Hi js10
Are the pages published and approved? What you mean with keyword? Is it a custom colum? You can create a Managed Property with the option searchable.
Best Dave
- js10Copper Contributor
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