Forum Discussion

Matt9915's avatar
Matt9915
Copper Contributor
Feb 13, 2025

Modern PnP Search Web parts

Hi,

I've recently built a SharePoint Online based People Finder Tool for my Company using the Modern PnP Search Web Parts. It is working fine, apart from one annoying glitch that I can't seem to find a solution to.

If a colleague searches for another colleague by last name (e.g. Smith, Wilson) it returns results as expected. But if a colleagues searches for another colleague using a last name that is also a common English word (e.g. Black, Brown, Snow, Blow, White) it returns no results. Unless a comma is placed after the name (i.e. Black, or Snow,) in which case it returns results as expected.

The same behaviour isn't happening on a Teams search, so it's specific to the PnP Web Part for some reason. I am tearing my hair out trying to find a cause and/or solution. If anyone has come across it and can help it will be very much appreciated.

Thanks in advance.    

4 Replies

  • KasperLarsen's avatar
    KasperLarsen
    Iron Contributor

    We need to know a lot more in order to help you:

    Which version of Modern Search are you using?

    Are you using Microsoft search or SharePoint search as the source?

    Are you using LocalPeopleResult?

    How is your Query Template defined?

    There are a lot of moving parts , so it is important to provide as many details as possible 😀 

    • Matt9915's avatar
      Matt9915
      Copper Contributor

      Hi Kasper,

      I replied to Dave earlier to advise that we've actually resolved the problem. For some reason my replies seem to be taking some time to be approved though!

      We were able to fix it by revising the search terms in the Results web part.

      Thanks for taking the time to respond though. Much appreciated.

  • Hello Matt9915 

    i try to understand your problem. Looking for a Mr. Black in my environment, it works fine. 

     

     

    How do you search?

     

    Best, Dave

    • Matt9915's avatar
      Matt9915
      Copper Contributor

      Thanks for replying Dave. I appreciate you taking the time to run a test on your environment. 

      Coincidentally, we actually resolved the issue this morning. It turned out to be down to the rules we had in the Query Template on the Results web part. We tweaked the search terms and it seemed to fix the issue.

      Thanks again for trying to help though 👍