1

I have a page (SharePoint 2013 - Foundation) with a search Results web part. In that web part I have added a filter to limit the results to the specific site (and it's children). So my Query text is:

{searchboxquery} Path:{Site.URL}*

This works.. except for one thing. I'm guessing here but I think the "Site.URL" is returning the site that contains the search results page and not the site that actually started the search!

What I'm trying to do is mimic the default search behavior where a search only contains results from the current site down. So for example

\sites\mySite\mySubSite

If I'm on mySite and search, I should get everything from mySite + mySubSite. However if I am in the mySubSite when I search, I should only get results from mySubSite and NOT the parent mySite.

So why am I getting any of these results... should get nothing based on the PATH filter

ScreenShot

  • Does this mean the search results WP is NOT on the site that initiated the search ? – Cameron Verhelst Feb 28 '14 at 7:44
  • Yes.. the actual 'search center' is at the \sites\mysite level. Per MS documentation it states that {Site.URL} is the site from where the query was issued. To me that means that if I am on \mysite\mySubSite and initiate the search there, that it should only include results mySubSite which it is not doing. – da_jokker Feb 28 '14 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.