In the public school district I work in, we use SharePoint 2013. We have a site collection (originally 2007, upgraded recently to 2013) with 1400+ subsites, each corresponding to a specific teacher or staff member.
I created an Enterprise Search Center as a subsite off the root of this site collection (/search) and was designing a Search Result Source such that when a user searches from a particular teacher's site, only items from that teacher's site or below would return.
This is the query text I used:
{searchTerms} Path:{Site.URL}
According to Microsoft's documentation at http://technet.microsoft.com/en-us/library/jj683123(v=office.15).aspx, the {Site.URL} variable returns the "URL of the site from where the query was issued." Unfortunately, that is not what seems to be happening.
When I enter a query in the search box on a given teacher's site (for example, /smithjohn) the results page in the search center returns items from the search subsite (/search), not the teacher subsite (/smithjohn).
What am I missing here to achieve the desired result?