Post by: Martin Dreyer
Posted on: 10/7/2013 3:31:00 PM
When using the Find a file search box in a SharePoint 2013 document library, you may find that no results are returned even though the same search at site level does return results from that library.
One possible cause of this is an unsuitable default result source.
When a library search is executed, the library path is automatically prepended to the query text entered. So if the user types the query india meeting, the resulting query will be something like the following
path"HTTP//INTRANET.SOMEDOMAIN.COM/SITES/ABC/DOCUMENTS" AND india meeting
The above query is then further combined with the default result source of the site since result sources cannot be set at library level.
If that result source contains tokens such as Site.URL then the library search fails silently because such tokens are not recognized from within library context.
Perhaps a future update will change this behaviour, but until then always ensure that the default result source of the site does not contain tokens such as Site.URL or SiteCollection.URL.