microsoft-search / pnp-modern-search

Home of PnP Modern Search solutions, helping you move from classic to modern SharePoint and beyond
https://microsoft-search.github.io/pnp-modern-search
Other
390 stars 341 forks source link

Search Results Returning 0 Results For Some Users #3967

Closed dorseytm closed 2 months ago

dorseytm commented 2 months ago

Version used Ex: 4.12.2

Describe the bug Valid searches conducted via the PnP Search Box are returning 0 results in the PnP Search Results webpart. Searching previously worked for affected users. All users are not affected. Validated that same search executed via built-in SharePoint Online search returns expected results.

To Reproduce Detailed steps to reproduce the behavior:

  1. Navigate to SharePoint site page with PnP Search Box and Search Results webparts.
  2. Enter query terms in PnP Search Box and execute search.

Expected behavior Listing of search results in the PnP Search Results webpart.

Screenshots Not working screenshot - Affected users PnPSearch_NotWorking

Working screenshot - Same search, different user PnPSearchWorking

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

kasperbolarsen commented 2 months ago

The "build-in SharePoint Online search" is actually using Microsoft search, so I recommend using one of the tools here to verify the issue: https://microsoft-search.github.io/pnp-modern-search/using-query-tools-to-verify-issues/

If it effects some users but not all my guess would be an issue with the indexer, see https://www.m365thinking.com/post/what-to-do-when-the-sharepoint-search-doesn-t-pick-up-your-content-part-1-of-4 for a guide how to check if MS is indexing your stuff

dorseytm commented 2 months ago

Hello Kasper. Thanks for the links. I have reviewed the content and performed the suggested steps, and it appears that the example items in question are indexed. All test cases returned expected results both in the SharePoint Search Query Tool and from the Search Crawl Log.

kasperbolarsen commented 2 months ago

Weird. I can squeeze you in this Thursday if you are able to have a short meeting

https://forms.office.com/pages/responsepage.aspx?id=xt4SFDF540m7kCquHMmhqrjqma_5-shDoiBP0hNegIRUMVhNN0ZDQ0FRWkVWT0lDUDBCOVdTR0xLMi4u

dorseytm commented 2 months ago

I should be able to make myself available this Thursday during business hours US EST.

kasperbolarsen commented 2 months ago

I should be able to make myself available this Thursday during business hours US EST.

Please check your spam filter, I have sent an invite for later today

kasperbolarsen commented 2 months ago

If you are using Microsoft Search as a data source, and the content isn't ExternalItems , then please switch to using the SharePoint Search as the source and see it that works.

dorseytm commented 2 months ago

We currently are using SharePoint Search as the data source.

-Thomas


From: Kasper Larsen @.> Sent: Wednesday, September 11, 2024 9:18 AM To: microsoft-search/pnp-modern-search @.> Cc: Thomas Dorsey @.>; Author @.> Subject: Re: [microsoft-search/pnp-modern-search] Search Results Returning 0 Results For Some Users (Issue #3967)

CAUTION: EXTERNAL EMAIL If you are using Microsoft Search as a data source, and the content isn't ExternalItems , then p͏​​‌͏ [External email] https://summary.us1.defend.egress.com/v3/summary?ref=email&crId=66e198c4a11938d93b2cb806&lang=en External email https://summary.us1.defend.egress.com/v3/summary?ref=email&crId=66e198c4a11938d93b2cb806&lang=en [External email] https://summary.us1.defend.egress.com/v3/summary?ref=email&crId=66e198c4a11938d93b2cb806&lang=en

CAUTION: EXTERNAL EMAIL

If you are using Microsoft Search as a data source, and the content isn't ExternalItems , then please switch to using the SharePoint Search as the source and see it that works.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/microsoft-search/pnp-modern-search/issues/3967*issuecomment-2343651187__;Iw!!AbncF5IA!fT1yGG7YsE2MHW0Og1Ysa8TgPotvb2maaTWtr8l9qJQbgHm38FjWy2IuZwJ8AKd41fha4H40K7iYmOlscZk_aWs$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AANPHVM43IWVXGHWBNQH3IDZWA7LXAVCNFSM6AAAAABNXLLL2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBTGY2TCMJYG4__;!!AbncF5IA!fT1yGG7YsE2MHW0Og1Ysa8TgPotvb2maaTWtr8l9qJQbgHm38FjWy2IuZwJ8AKd41fha4H40K7iYmOls86-LA7o$. You are receiving this because you authored the thread.Message ID: @.***>

JeighBI commented 2 months ago

I actually have this problem right now - search results show for user A, but zero results for user B. I have their permissions set up exactly the same way. My only note to add is that in my scenario, PnP Search is running on Site A, but pulling results from Site B.

I'm still troubleshooting to make sure there isn't something I'm missing, but just happened to see this thread and was curious.

kasperbolarsen commented 2 months ago

@JeighBI any chance you can check the query and response from the API using the Dev tool for both a user where it works and one where it doesn't?

JeighBI commented 2 months ago

@kasperbolarsen which Dev tool are you referring to? I'll be happy to check.

Interestingly, we're experiencing a similar issue on another tenant with the out-of-box Search bar - where one user will get search results from a query, but another user will get zero results. Everything is setup correctly and user permissions are the same.

I noticed in both tenants there is an Advisory affecting search (see below). Of course, I don't know if this is the underlying issue, but I'm inclined to wait and see if the issue is resolved by Monday (which, according to the latest update, is supposed to be).

Users searching sites with auto-generated managed properties may see incorrect results

Issue ID: SP886644 Affected services: SharePoint Online Status: Service degradation Issue type: Advisory Start time: Sep 9, 2024, 10:49 PM EDT

More info Impact is specific to SharePoint Online users searching sites containing auto-generated managed properties. As a result of this issue, such items may not have up-to-date search indexing, which is impacting the accuracy of users' search results.

kasperbolarsen commented 2 months ago

I am referring to the Browser Dev tool, as per this video: https://www.youtube.com/watch?v=kPMSiRxK8H8

JeighBI commented 2 months ago

@kasperbolarsen, thanks! (and subscribed :) )

The payload appeared to be exactly the same between the two users, but the response for the effected user didn't return any results (it did contain some general schema though).

I then had the user go directly to the library and perform a library search there, and no results were returned there either. So, this issue (that I'm seeing, at least) isn't specific to PnP Search. And, again, I'm seeing the issue across different tenants - all of which have the same active Advisory related to Search.

dorseytm commented 2 months ago

Thanks @JeighBI for calling out there is an active Advisory that seems related to this issue. When I first opened up this issue there were no advisories related to searches in SharePoint Online. Seems this advisory started a short time after I opened this issue.

wobba commented 2 months ago

Closing as it's API related, nor web part related.

dorseytm commented 2 months ago

Requesting this issue re-opened as Microsoft's resolution to the service advisory has been stated as being fully deployed and validated as of Sept 20th and we continue to have users unable to return search results.

JeighBI commented 2 months ago

@dorseytm You may want to have the users try searching directly in the library with the default Library search bar. If they get no results there either, then the PnP Search web parts are not the culprit.

For whatever it's worth, my users also had the issue after the fix was completed. I had to request a re-index of the library before it started working again (even though I had already tried this while the advisory was active). For the reason, I selected "Permissions for library content are not reflected correctly in search results". I don't know if the reason makes any difference, but the library seemed to re-index pretty quickly.

And, lastly, I believe that only users who were recently added to the library (which has unique permissions) had this issue. They appeared to get search results for other libraries (on the same site) of which they had permissions to prior to the advisory.

dorseytm commented 1 month ago

@JeighBI,

Thanks for the suggestions. In our initial troubleshooting we tried and verified results were returned when using the default library search bar. Also, a re-index of the lists was requested as well to no avail.

dorseytm commented 2 weeks ago

@kasperbolarsen

Just wanted to thank you again for the assistance with this issue. Your suggestion about removing the query from the custom Result Source to the query string seems to have resolved our issue! Really appreciate the assist!

kasperbolarsen commented 2 weeks ago

Happy to be able to help out 😊