Forum Discussion
captainclito
Apr 15, 2022Copper Contributor
problem with pnp search always dispaying the same results
Hello, I am using PnP Modern Search web parts on sharepoint online and each time i try to search it seems that i got always the same results (and the same result count) whatever my search words is. ...
- Apr 16, 2022
captainclito Here is the solution. As i used the microsoft search box i had to connect the search result web part to it; i didn't do it that's why it didn't work. https://microsoft-search.github.io/pnp-modern-search/usage/search-results/connections/
captainclito
Apr 15, 2022Copper Contributor
DaveMehr365Hello thanks for the answer. Actually the request can be read like this
{searchTerms}
(fileextension:docx OR fileextension:doc OR fileextension:pdf OR fileextension:xls OR fileextension:xlsx OR fileextension:pptx
OR fileextension:ppt) AND
(Path:https://TENANT.sharepoint.com/sites/SITEX OR
Path:https://TENANT.sharepoint.com/sites/SITEY)Furthermore i use Microsoft Search box because i modify search parameter so that result be put in a my custom page and i used in the pnp search result
DaveMehr365
Apr 16, 2022MVP
Hello captainclito
have you tested it on a page with the PnP Search Box? Same counts of results? With Microsoft Search Data Source you have APi entity types to use: https://microsoft-search.github.io/pnp-modern-search/usage/search-results/data-sources/
Regards, Dave
- captainclitoApr 16, 2022Copper ContributorActually i saw i didn't connect the search result to the search box that's why it didn't work. 😉