When searching for an item in a large list/library using the "Find a file/item" the search results do not appear to return all files/items that are expected. This will generally be seen in lists and libraries that have exceeded the list view threshold.
NOTE: The 500 (60 if the list exceeds the list view threshold) results that are returned are not affected by current view. Instead they are the first 500 (60 if the list exceeds the list view threshold) that the query finds within the search index of the list/library.
In short, the find a file/item will search through all folders and items and return the first 500 items (60 if the list exceeds the list view threshold) within the search index of the library that meet the search criteria, then apply the view filter which can result in only a subset of items/files being returned.
Tailspin Toys has a large document library (5,000+ items) that keeps track of local vendors and what items need to be ordered. These items are also organized by year that they are ordered within folders. They require that they have certain metadata on each of these documents that track the city in which these items are located. See below for scenario visual.
A user is working within the 2013 folder and reviewing order forms. The 2013 folder has around 2,000 items. The user wants to search these documents by the city metadata column, so they type in "New York" into the find a file search box. The user notices a couple things:
When the search query is run for these items, SharePoint will run the query on the entire document library and will not distinguish documents that are only in the 2013 folder that the user is working in. Since the CAML query view has a hard limit of 500 items (60 if the list exceeds the list view threshold) that it will return that meet the "New York" criteria, it only returned the first 500 (60 if the list exceeds the list view threshold) that it found within the document library.
If you can identify one of the items in the library that is not showing when running a find an item search, you can do a quick test by searching for the list ID of the item. Here are some instructions for doing this.
If the item shows, that means that when you are doing the initial query, you are hitting the 500 item limitation. If it still does not show, that means that the item may not be available in the index. More information on re-indexing a list/library can be found here.
You can also search for the document within the search center. This can be search box can be located on the top right side of the document library shown below:
Note: If you are doing a generic search from the Site search center there are instances that the results you are expecting to see are not returned which could be expected behavior depending on configuration or dynamic duplicate trimming.
Note: This same process applies to modern list and library search however there are additional filters that are applied to the query sent to the SearchAdapter that will change the result set returned verses classic search.
Contributors: Tony Radermacher[MSFT] and Tania Menice[MSFT]