How to Search for documents in a SharePoint document library?

In this SharePoint tutorial, we will discuss how to search for documents in a SharePoint document library.

Search documents in SharePoint Online

Microsoft provides the search functionality to find documents from various libraries in a SharePoint site.

There are different ways to search for documents in SharePoint Online. They are:

  • Search Documents within SharePoint Document Library.
  • Search Documents within Site Search.
  • Search Documents within Tenant wide Search.

But to search the documents, we need to enable the below two things.

  • Enable Search in SharePoint Document Library: We need to enable it by particular SharePoint Document Library settings. Once enabled, we can search the Documents within the SharePoint Document Library. If this option is disabled, the documents will not appear in the SharePoint search result.
  • Enable Search and Offline Availability in SharePoint Online: We need to enable it in SharePoint Site Settings; once we enable it, we can search the Documents within Site Search and SharePoint Wide Search.

Enable Search and Offline Availability in SharePoint Online

Specify whether this site should be visible in search results. If it is not enabled, then none of the documents under this SharePoint site will appear in the search result.

  • Open the SharePoint Site and then go to the Site settings -> Under Search, choose Search and Offline Availability.
Search documents in a Modern SharePoint Online document library
  • Under Indexing Site Content, specify Yes this site should be visible in search results.
Search documents in a SharePoint Online document library
  • Then click on the OK button to save your changes.

This is how to enable “Allow this site to appear in search results?”.

Enable Search in SharePoint Document Library

Here, we specify whether this document library should be visible in search results. 

  • Go to the SharePoint document library, where we need to search for documents.
  • Then click on the setting icon on the page’s top-left corner, and choose Library settings.
Search documents in a SharePoint document library
  • Under General Settings, choose Advanced Settings.
Search to find documents in a Modern SharePoint Online document library Examples
  • Under the Search section, Specify Yes to Allow items from this document library to appear in search results.
Search to find documents in a Modern SharePoint document library Examples
  • Then click on the OK button to save your changes.

Once this option is enabled, the documents will appear in the SharePoint search result.

Search documents within SharePoint Document Library

When handling different types of files in a particular document library, this will be the best way to find a particular document.

  • Navigate to a particular Document library.
  • Use the Search box that appears on the top-center of the page as shown below:
Search to find documents in a SharePoint document library
  • Now search for the particular documents by name or any parameter, it will appear in the down; click on the document if needed.
Search to find documents in a SharePoint Online document library

This way, we can search for documents in the SharePoint Online library.

Search documents within the Site Search

We can search for a particular document on a particular SharePoint site.

  • Navigate to a particular site’s home page. Use the Search box that appears on the top-center of the page.
Search to find documents in a Modern SharePoint Online document library
  • We will find the document, which we searched for in the above section.
Search to find documents in a Modern SharePoint document library

This is how to search for documents on a SharePoint Online site.

Search documents within Tenant Wide Search

On the SharePoint Home page, where we can find all sites there. We will search for a particular document in SharePoint Wide.

  • Open the SharePoint home page, or else navigate to the https://<tenant name>.sharepoint.com
  • Use the Search box that appears on the top-center of the page.
Search to find documents in a Modern SharePoint Online
  • We will find the document that we searched in the above section.
Search to find documents in a SharePoint Online

This is how we can search for a particular document in the document library in SharePoint Online.

Quickly Find Documents Based on Metadata Filters in SharePoint document library

Let us see how to quickly find documents based on metadata filters in the SharePoint document library.

  • Open a SharePoint Document Library, then Click on the filter pane shown below.
SharePoint Document Library Search to Quickly Find Documents Based on Metadata Filters
  • Select the option based on what you want to filter. Here, I have selected Marketing. You can even choose multiple options.
Document Library in SharePoint Online Quickly Found Documents Based in Metadata Filter
  • Based on the filter criteria, it will display the documents from the SharePoint document library like below:
Search Quickly to Find Document Based on Metadata Filter

This is how to search quickly to find documents based on Metadata Filters in a SharePoint document library.

Quickly Find Documents Based on Keywords in a SharePoint Online document library

This part will show how SharePoint Document Library Search Quickly Find Documents Based on Keywords.

  • Open a SharePoint Document Library -> Navigate to the search box, type the text/keyword, and hit enter.
Quickly Find Documents Based on Keywords in a SharePoint Online document library
  • Now we can see the search results related to your searched keyword from the document library.

This is how to Quickly Find Documents Based on Keywords from a SharePoint Online document library.

Combine Metadata Filter and Keyword Search in SharePoint Document Library

This section will show how to combine Metadata Filter and Keyword Search in SharePoint Document Library.

For this, we have to use one trick to reverse the steps; we have to filter first, and then perform the keyword search.

  • Open a SharePoint Document Library -> Click on the filter pane. For Example, if I choose Finance, it will show Department: Finance under Results from the document library.
Document Library in SharePoint Online Quickly Found Documents Based in Keyword
  • Navigate to the search box, and type the text/keyword you are looking for, and hit enter. Here, I want to search each file under Finance containing the keyword Organization.
Metadata Filter and Keyword Search Combined in SharePoint Document Library
  • The screenshot below displays the result related to our Metadata filter and searched keyword.
Quickly Search SharePoint Document Library Using Keywords and Metadata Filter

This is how to combine metadata filter and keyword search in SharePoint Document Library.

Conclusion

This SharePoint Online tutorial covered how to search for documents in SharePoint Online differently.

You may also like: