Forum Discussion
problem with pnp search always dispaying the same results
- 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/
Hello captainclito
is that an „and“ or „or“ before the path? And i have see that you put in the query in the Microsoft Search box, not in an PnP Search Box, try to configure a PnP search box and check your results.
Regards, Dave
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
- DaveMehr365Apr 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. 😉