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.

- Under Indexing Site Content, specify Yes this site should be visible in search results.

- 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.

- Under General Settings, choose Advanced Settings.

- Under the Search section, Specify Yes to Allow items from this document library to appear in search results.

- 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:

- Now search for the particular documents by name or any parameter, it will appear in the down; click on the document if needed.

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.

- We will find the document, which we searched for in the above section.

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.

- We will find the document that we searched in the above section.

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.

- Select the option based on what you want to filter. Here, I have selected Marketing. You can even choose multiple options.

- Based on the filter criteria, it will display the documents from the SharePoint document library like below:

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.

- 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.

- 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.

- The screenshot below displays the result related to our Metadata filter and searched keyword.

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:
- How to sort columns in a SharePoint Online list?
- Create a Lookup Column in SharePoint Online List
- Share a SharePoint Online document library Files with external users
- Add Members to a SharePoint Online Site

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.