Forum Discussion

Bahalzamon's avatar
Bahalzamon
Copper Contributor
Feb 13, 2024

Search not returning results

I have been experiencing issues with the search where it was working well until a couple months ago.

 

Using SharePoint Online I have a document library with a lot of folders and misc other things in each folder.

Staff search the library by the name of the folder in the root directory which is the account number.

 

Lately most of the time it will return zero results and I cannot identify the issue, some users it works others it doesn't.

  1. I have checked permissions, identical (Owners)
  2. Search enabled on library
  3. Versioning is on but set to major versions only
  4. Site Settings > Search and Offline Availability > Indexing Site Content = Yes

I am wondering if there is any sort of setting or something that I am missing...

Any help is greatly appreciated. 🙂

12 Replies

  • Jan_Sharepoint's avatar
    Jan_Sharepoint
    Copper Contributor

    Hello Bahalzamon,
    I've been experiencing the same issue, in fact it's the reason I ran into your post. I am a Sharepoint administrator, I have access to the entire site of my company including hubsites, yet, SP Search does not yield particular documents in particular libraries--even if I created these documents and even if I can access the document library. I can navigate to their location and access these documents without problem.

    It is my impression that Microsoft has been changing permission policies over the past couple of months, because for obscure reasons, parts of the Sharepoint site demanded me to grant permission. As a site manager, this was no problem, but the reason why I needed to regrant permission to myself is not clear to me.

    I have experimented with a number of search variables, in order to find the source of this problem.

    First, I found that the issue depends on the document that I am looking for: some will show up in search, others won't.

    I also found that ownership is not a decisive factor: documents I created are not visible in Search results, whilst documents I didn't create will show up.

    I also tested for the environment of my searches. I work on a Macbook pro, accessing Sharepoint via my browser and I can access Sharepoint via Microsoft Remote Desktop in my company's working environment. I wanted to make sure there were no limitations imposed by the Microsoft license manager, but this didn't make a difference either.

    Then I tested for browsers and found that, ironically, Microsoft Edge (on Mac OSX) has temporary glitches in search results. Opening a new window and performing a new search will sometimes help reanimate SP Search, but I am not assuming this is (y)our problem, since this workaround, well..., works.

    Finally, inspired by some posts on Reddit, I tested for users with different permission levels. I asked a company manager if she did see all search results for documents in that particular library, and she did. She has edit permissions throughout all hubsites, subsites and document libraries. I also noticed that I, as Sharepoint manager, was not included in the document library permissions, so I added myself to have full access to this particular library. I will have to keep you in suspense about the outcome, because permission changes on Sharepoint may take a while to take effect.

    Moreover, documents that would show up in my search results, were located in libraries I did have full control access to. So I am moderately optimistic about the outcome.

    I am less optimistic about the consequences on site-wide level, because if this is the cause of the issue, it means that I will have to regrant myself access permission to all site locations that are now shielded from search results. Some locations have permissions that are not inherited from parents, so I will have to check all of those locations individually.

    • Jan_Sharepoint's avatar
      Jan_Sharepoint
      Copper Contributor

      Regarding suspense...

      I found out that granting myself permissions to the folders in Sharepoint resolves the issue. As a SP-site  administrator and creator of the document that I am looking for I don't understand what change in Microsoft permission policies made that necessary, but it works. 

      I had to make sure that all folders at higher levels that did not inherit permissions from above, needed to be granted permission. In this case, edit permissions worked out fine.

  • Bahalzamon..... Have you resolved this issue yet? Just wondering, we are having the same issue. When searching a document library in SharePoint the only results that are returned are documents, and some sub folders.
    • Bahalzamon's avatar
      Bahalzamon
      Copper Contributor
      Unfortunately no.
      What I ended up doing as a work around that I feel will only work for my situation is to create a button with HTML/JS and a text input to automatically navigate to the folder with the value that is typed in the input.
      As the folder they are looking for is the account number they just copy and paste it into the text area and click the button and it opens a new tab that is navigated into the folder. It does not have any error handling or anything, so if they type in any random string it will attempt to navigate there.
      It works for their need but is NOT in any way a solution for this issue.
      • CardinalNight's avatar
        CardinalNight
        Copper Contributor

        Bahalzamon I'm having the same issue using sp.search to search for hub sites and their associated sites. I'm getting incomplete associated site results where I know for a fact that there are sites in existence. I've been told that there could be indexing issues with MS's Search - happening since January. It's a notification in the Admin centre apparently.

  • BarryGoblon's avatar
    BarryGoblon
    Iron Contributor
    First off, there could be multiple potential culprits behind the search issue you're facing. A good starting point would be to inspect the search schema. Ensure the columns you're searching against, like folder names, are included and marked as crawled properties. Check this under the Search Schema section in Search Administration. Another avenue to explore is verifying the search crawl status. Head over to Search Administration and confirm the crawl is completing successfully for your site collection and that content sources are correctly configured. An incomplete or failed crawl could lead to outdated or missing search results.

    While you're there, it's worth confirming the search settings scope is appropriately defined. If set too narrowly, it may exclude relevant results from other locations. Adjust as needed. Additionally, try clearing the search cached results, as stale cached data might cause inconsistent search behavior. Look for the "Search Cache Accounts" section in Search Administration and clear the cache for your web app or tenant.

    Furthermore, review the crawl log files for any errors preventing content from being crawled and indexed properly. These logs reside in the "Crawl Log" section of Search Administration. As a last-ditch effort, you could attempt restarting the SharePoint Search Services, assuming you have access. A service restart sometimes resolves transient search issues.
    • Bahalzamon's avatar
      Bahalzamon
      Copper Contributor
      This particular document library has 10 million+ records. But I have had it happen on other lists that are far smaller (thousands) that I can look back in my notes to get any additional data if it would help.
      • Well that's probably your issues, the search is having issues to index the whole 10 million+ records. What you can do is create a support ticket and see if the support can see if search still is indexing

Resources