If the search functionality in SharePoint is not working, it is often due to issues related to search indexing, search service configuration, or crawl settings. Below is a comprehensive step-by-step guide to diagnosing and fixing search-related issues in SharePoint.
Step 1: Identify the Scope of the Issue
Before diving into troubleshooting, determine the extent of the problem:
- Is search broken for all users or specific users?
- If some users can search while others cannot, check user permissions.
- If no users can search, it could be an issue with the search service or index.
- Is the issue specific to certain sites, libraries, or lists?
- If search works in one site but not another, it may be related to that site’s settings.
- If the issue is system-wide, the problem is likely at the farm or service level.
- What is the error message?
- No results found? (Possible indexing issues)
- “Search is not available”? (Possible search service issue)
- Partial results appearing? (Index corruption or crawl issue)
- Check if the issue occurs in both modern and classic search experiences.
- If classic search works but modern does not, it might be a UI issue.
Step 2: Verify the Search Service Application
SharePoint’s search functionality depends on the Search Service Application (SSA). If it is not running correctly, search will fail.
2.1: Check if the Search Service is Running
- Go to Central Administration.
- Click on Manage Services on Server.
- Look for Search Service and ensure it is Running.
- If not running, start the service.
2.2: Validate the Search Service Application
- Go to Central Administration.
- Click Manage Service Applications.
- Locate Search Service Application.
- Ensure that it is created and functional.
- If missing, you may need to recreate it.
Step 3: Check the Search Index and Crawl Status
Search results depend on indexed content. If SharePoint hasn’t crawled new data, it won’t appear in search.
3.1: Verify Search Index Status
- In Central Administration, go to Manage Service Applications.
- Open Search Service Application.
- Check the Crawl Log:
- Look for errors.
- If the crawl hasn’t run recently, it may need to be restarted.
- Navigate to Index Reset (Use with caution).
- Resetting will delete all indexed content and require a full crawl.
3.2: Run a Full Crawl
- In the Search Service Application, go to Content Sources.
- Click on Start Full Crawl.
- This ensures the latest content is indexed.
- Wait for the crawl to complete, then try searching again.
Step 4: Ensure the Search Schema is Correct
The search schema defines how content is indexed and retrieved.
- Go to Search Administration.
- Click Manage Search Schema.
- Ensure that required properties (e.g., title, metadata) are included in the search index.
- If custom columns are missing from search, ensure they are marked as “Searchable”.
Step 5: Check Permissions on Content
If SharePoint Search is working but does not show expected results, it might be due to permissions.
- Open the document library or list.
- Click Library Settings > Permissions for this document library.
- Ensure that users have Read access.
- If items have unique permissions, verify they are indexed.
Step 6: Verify Search Query Rules and Result Sources
Sometimes, incorrect search query rules can block results.
- Go to Search Service Application > Query Rules.
- Check if there are any active rules blocking queries.
- Also, verify Result Sources.
- If needed, reset settings to default.
Step 7: Check SharePoint Search Configuration in Site Settings
- Open the SharePoint site where search is not working.
- Go to Site Settings > Search Settings.
- Ensure that search is not restricted.
- Verify that search navigation is set up correctly.
Step 8: Clear Search Cache & Restart IIS
If changes have been made but search is still not working:
- Open SharePoint Management Shell as Administrator.
- Run the following command to clear the search cache:
net stop osearch15 net start osearch15 iisreset
- Wait for a few minutes and retry search.
Step 9: Test Search Using SharePoint Query Tool
If search is still not working, use the SharePoint Search Query Tool to test queries.
- Download the SharePoint Search Query Tool.
- Connect it to your Search Service Application.
- Run test queries to see if results are fetched.
Step 10: Consider Rebuilding the Search Service
If all else fails, you may need to recreate the Search Service Application.
- Backup existing configuration.
- Delete the Search Service Application.
- Create a new Search Service Application.
- Configure content sources and run a full crawl.